0

I have made a website with MVC and I have a little problem on routing: the link addresses from address bar appears with some strange paramaters like:

http://localhost:1413/Account/LogOn?ReturnUrl=%2f

instead of

http://localhost:1413/Account/LogOn

What should I do to have customized addresses.

I don't use any parameters.

pisi
  • 127
  • 1
  • 4
  • 16

1 Answers1

1

The ?ReturnUrl=%2f portion of the Url is added by ASP.NET when a user is automatically redirected to the login page. Its added so that after the user logs in, they can then be redirected to their original page.

In this case, %2f represents the / meaning that the user tried to access the landing page and was subsequently redirected to the logon page. After they login successfully, they will then be redirected to the landing page.

You can still use the http://localhost:1413/Account/LogOn

robasta
  • 4,621
  • 5
  • 35
  • 53
  • Thanks for help! There is a possibility to not have the `?ReturnUrl=%2f portion` ? – pisi Jan 09 '13 at 12:47
  • there is no 'easy' way of removing it.You can try this solution: http://stackoverflow.com/a/9796693/202609 (also go through the other answers on that question). – robasta Jan 09 '13 at 12:53