ASP.NET MVC - 使用通用machineKey进行跨应用程序验证时IE的注销问题

时间:2016-04-16 07:01:40

标签: asp.net-mvc iis-7.5

我是一个MVC5项目,其中模块分布在多个Web应用程序中,部署在单个IIS服务器,单个应用程序池中。

服务器:Windows 2008 R2(SP1)
IIS:7.5.7600.16385

使用表单身份验证,并通过使用常见的' machineKey'来启用跨应用程序身份验证。

问题
使用Internet Explorer 10/11并执行以下步骤时,跨应用程序身份验证共享不再有效 1.登录并打开另一个模块 2.签出
3.登录并打开另一个模块 - !!重定向回登录页面

Chrome和Firefox不会发生此问题。

配置示例

<system.web>
<httpRuntime targetFramework="4.5" />
<compilation debug="true" targetFramework="4.5" />

<machineKey validationKey="KEYXXX" 
            decryptionKey="KEYXXX" 
            validation="SHA1" 
            decryption="AES" />
<authentication mode="Forms">
<forms loginUrl="/login/login.aspx" timeout="120" cookieless="AutoDetect" name=".ASPXFORMSAUTH" />
</authentication>
</system.web>

退出代码

FormsAuthentication.SignOut();
HttpContext.Session.Remove(MvcConstants.userContextSessionKey);

对此表示感谢。

0 个答案:

没有答案