ASP.NET MVC-3 FormsAuthentication ReturnURL

Ich bin mit formularbasierte Authentifizierung in mein MVC-3 app und habe ein problem mit meinem URL zurück.

Wenn ich daneben eine Aktion <Authorize> auf dem Home controller, es leitet auf die login-Seite und funktioniert auch, aber die Rückgabe-URL ist dann /, so dass, wenn es leitet, es wird umgeleitet, um die Wurzel der aktuellen URL Authorize.

Also die URL ' s sehen wie folgt aus:

http://localhost/ - Controller = Home - Action = Index

http://localhost/Authentication/LogOn

Ich am Ende mit diesem: http://localhost/Authentication/LogOn?ReturnURL=~%2F, ich brauche, um wieder zu http://localhost/

Hilfe!!!! 🙂

  • was ist Ihre localhost default-route ?
  • routes.MapRoute( _ "Default", _ "{controller}/{action}/{id}", _ New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional} _ )
InformationsquelleAutor Sam | 2011-03-29
Schreibe einen Kommentar