即使在身份验证标记中指定表单后,也不会在mvc 3应用程序中的会话超时后重定向到登录页面。 这是web.config代码: -
<authentication mode="Forms">
<forms loginUrl="http://localhost/securityManager/Account/LogOn" timeout="1" enableCrossAppRedirects="true" defaultUrl="http://localhost:50008"/>
</authentication>
答案 0 :(得分:0)
请参阅此链接。 http://msdn.microsoft.com/en-us/library/vstudio/eb0zx8fc%28v=vs.100%29.aspx
简而言之......
To configure forms authentication across applications, you set attributes
of the forms and machineKey sections of the Web.config file to the same
values for all applications that are participating in shared forms
authentication.