繁体   English   中英

在负载平衡环境中进行部署的WIF 4.0问题

[英]WIF 4.0 issue with deployment on load balanced environment

我正在使用WIF 4.0来构建声明感知的RP和STS。 我现在遇到问题,因为我已经用承载应用程序的多台服务器部署到了生产环境。 由于某种原因,我感到恐惧

[CryptographicException: Key not valid for use in specified state. ]

用户闲置一段时间后出现错误。 我想知道是否有人对此有经验? 使用机器钥匙会有所帮助吗? 在服务器上重置IIS时,我也看到此错误。 我已经将LoadUserProfile设置为true。

我认为您需要在web.config中指定与此类似的内容。 此外,您需要在所有服务器上将机器密钥设置为相同。

    <system.identityModel>
  <identityConfiguration>
    <securityTokenHandlers> 
                <remove type="System.IdentityModel.Tokens.SessionSecurityTokenHandler, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <add type="System.IdentityModel.Services.Tokens.MachineKeySessionSecurityTokenHandler, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  </securityTokenHandlers> 
  </identityConfiguration>
</system.identityModel>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM