窗体身份验证子域cookie传递一些服务器不是别人窗体、身份验证、服务器、不是

2023-09-07 09:06:40 作者:承蒙时光不弃。

我想设置窗体身份验证跨多个服务器和子域,但我发现它的工作原理我们的一些盒子,而不是其他的问题。我们通过2饼干从一台服务器到另一个。其中一个窗体身份验证加密的cookie和其他的非加密的cookie。

I am trying to set up forms authentication across multiple servers and subdomains but I am finding an issue where it works on some of our boxes and not others. We are passing 2 cookies from one server to another. One the Forms Authentication encrypted cookie and the other an non encrypted cookie.

我们有两个框设置正确的键:

We have the correct keys set on both boxes:

<authentication mode="Forms" >
  <forms name=".MSLA" protection="All" timeout="30" slidingExpiration="true" path="/"
         enableCrossAppRedirects="true" />
</authentication>
<machineKey
  decryption="AES"
  decryptionKey="CAB....."
  validation="AES"
  validationKey="A2........."
/>

我们正在设置了正确的cookie域,例如。 .bbbb.com为一体的网站将 http://login.bbbb.com ,另一个是的 http://app.bbbb.com 。

We are setting the correct cookie domain eg. .bbbb.com as one site will be http://login.bbbb.com and the other being http://app.bbbb.com.

我们使用的是ASP.net和.Net 4.0

We are using ASP.net and .Net 4.0

在该做的工作,我发现了isAutenticated是真实的,窗体身份验证的用户名被解密的箱子,但在其他套箱不工作,我发现,非窗体身份验证cookie是正确传递和阅读但窗体身份验证Cookie传递(我可以看到这与萤火虫),但第二个网站是无法解密它,isAuthenicated因此假。

On the boxes that do work I am finding that the isAutenticated is true and the Forms Authentication username is decrypted, however in the other sets of boxes that do not work I am finding that the non forms authentication cookie is passed correctly and read but the forms authentication cookie is passed (I can see this with Firebug) but the second site is unable to decrypt it and isAuthenicated is therefore False.

我们使用的是Windows Server 2008和更新,其中在一个月前申请。

We are using Windows server 2008 and updates where applied a month ago.

我已经看到了这类似的文章,以我的问题,我已经试过,但,这并不为我工作。

I have seen this similar article to my problem and I have tried this but this doesn't work for me.

类似的文章有同样的问题,但不工作

有没有人遇到过这个问题之前?我想,这一定是更多的是服务器的设置问题,而不是在code的,因为我能得到它在某些服务器不是别人的工作。 有可能需要被添加到这些服务器的功能?

Has anyone come across this issue before? I am thinking that it must be more of a server setup issue rather than the code as I am able to get it working in some servers not others. Is there feature that might need to be added to these servers?

推荐答案

更新

我已经找到了问题是什么。我们需要完全更新所有服务器的最新的服务包。微软必须改变了他们的解密算法和箱子必须对他们不同的更新。

I have found out what the issue is. We needed to completely update all of the servers to the latest service packs. Microsoft must have changed their decryption algorithm and the boxes must have has different updates on them.

由于微软保持每个人都了解这一变化.....

Thanks Microsoft for keeping everyone informed of this change.....