阅读背景:

如果URL不包含WWW,则Azure Cloud Service丢失会话

来源:互联网 

My Azure cloud service app has users logged in with session data. If they click on a link internally that doesn't have a preceding www, then the session data is not applied. If they go back and click on a link that does have a preceding www, the session data works as expected. Does anyone know how to resolve this?

我的Azure云服务应用程序让用户使用会话数据登录。如果他们单击内部没有前面的www的链接,则不会应用会话数据。如果他们返回并单击具有前一个www的链接,则会话数据按预期工作。有谁知道如何解决这个问题?

TIA

TIA

1 个解决方案

#1


1  

Sounds like your session cookies are not tuned to the wildcard of the domain. Can this be a problem? Check the forms section of your web.config if it contains domain attribute and if it doesn't, set it.

听起来您的会话cookie未调整到域的通配符。这可能是个问题吗?如果它包含域属性,请检查web.config的表单部分,如果没有,请进行设置。

<authentication mode="Forms">
  <forms loginUrl="/Account/LogOn" timeout="43200" domain="yourdomain.com"/>
</authentication>

分享到: