This project is read-only.

login error

May 22, 2012 at 2:56 PM

In part 7 in tutorial mvcmusicstore i have problem to login. i have created an admin account and when i try to login it just stays at the login page, it should jump to the storemanager page but nothing happens. the link is http://localhost:52302/Account/LogOn?ReturnUrl=%2fstoremanager. 



May 22, 2012 at 4:42 PM

Peter -

I recommend that you set a breakpoint in the AccountControllerLogon LogOn(LogOnModel model, string returnUrl) method and debug. Hopefully you should see if and why the authentication request is failing.

- Jon

May 25, 2012 at 12:14 PM

Thanks for your comment, i have tried to debug and it jumps into



(Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 && returnUrl.StartsWith("/" ) && !returnUrl.StartsWith

("//") && !returnUrl.StartsWith("/\\" ))


return Redirect(returnUrl);



then its just jumps back to the login page. i am not a debugger pro so if you push me forward with your thoughts. The returnurl is /storemanager . Could it be something wrong there. To me it looks right.

Aug 23, 2013 at 12:57 PM
Edited Aug 23, 2013 at 12:58 PM
Hi there,

I have exactly the same problem. while debugging it does not redirect to StoreManager! although the logon is successful. I am wondering if this is a problem with the code that I have written, as I tried to recreate the project! When I run the Mvc Music Store app it reaches the StoreManager after log on process, although my code and the original code are exactly the same!
Could you please help me on this?