【问题标题】:WIF - Safari Cookie truncated when used with Azure ACS. Work around in .NET 4.5?WIF - Safari Cookie 在与 Azure ACS 一起使用时被截断。在 .NET 4.5 中工作?
【发布时间】:2012-11-20 02:26:37
【问题描述】:

我有一个在 Windows Azure 上运行的 ASP.NET MVC4 应用程序,它使用 Azure ACS 进行联合身份验证。

当我们第一次开始测试应用程序时,由于 cookie 的大小,它可以在除 Safari 和 Opera 之外的所有浏览器中运行。

我在网上看了几篇文章,要求我使用 FederatedAuthentication.SessionAuthenticationModule.IsSessionMode = true;

上述语句将数据存储在服务器端的cookie中。这解决了问题,因为客户端(浏览器)上只存储了一个会话标识符。

但是,该属性似乎已从 WIF 4.5 api 中删除。

你知道是否有解决办法吗?

【问题讨论】:

    标签: asp.net-mvc azure safari wif acs


    【解决方案1】:

    您保存原始令牌吗?您的 web.config 中是否有类似的内容,或者您​​是否将 saveBootstrapTokens 配置设置设置为 true:

    <securityTokenHandlers>
        <securityTokenHandlerConfiguration saveBootstrapTokens="true" />
    </securityTokenHandlers>
    

    如果您这样做,或者如果您不这样做,请尝试将saveBootstrapTokens 设置为false!这将为您节省大量“空间”。

    仅当我将 saveBootstraptokens 设置为 true 时才遇到此问题。

    【讨论】:

      【解决方案2】:

      是的 - @astaykov 是正确的 - 这是其中的一部分。

      根据@Dominick,它在 .NET 4.5 中称为“IsReferenceMode”。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-04-11
        • 1970-01-01
        • 2012-02-25
        • 1970-01-01
        • 2011-01-28
        • 2012-12-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多