开发者

ASP.NET MVC Membership provider

开发者 https://www.devze.com 2022-12-19 16:05 出处:网络
I have an MVC website, and it is running on IIS6. Since i have not access to the webserver, i use the .aspx extension (in global.asax). I have a controller called \"Quiz\" and all of their methods mar

I have an MVC website, and it is running on IIS6. Since i have not access to the webserver, i use the .aspx extension (in global.asax). I have a controller called "Quiz" and all of their methods marked with an authAttribute. When the user is not authorized, it 开发者_如何学JAVAshould redirect to "/Account.aspx/Logon?ReturnUrl=Test.aspx", but i get a wrong url: "/Account/Logon?ReturnUrl=Test.aspx". How can i fix this problem?

Thank you in advance for your help.


Change your Web.config:

<authentication mode="Forms">
  <forms loginUrl="/Account.aspx/Login" />
</authentication>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号