简体   繁体   English

如果URL不包含WWW,则Azure云服务丢失会话

[英]Azure Cloud Service Losing Session if URL doesn't contain WWW

My Azure cloud service app has users logged in with session data. 我的Azure云服务应用程序使用户使用会话数据登录。 If they click on a link internally that doesn't have a preceding www, then the session data is not applied. 如果他们在内部单击没有前面www的链接,则不会应用会话数据。 If they go back and click on a link that does have a preceding www, the session data works as expected. 如果他们返回并单击确实具有前面的www的链接,则会话数据将按预期工作。 Does anyone know how to resolve this? 有谁知道如何解决这个问题?

TIA TIA

Sounds like your session cookies are not tuned to the wildcard of the domain. 听起来您的会话Cookie并未调整为域的通配符。 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. 检查web.config的“表单”部分是否包含域属性,如果不包含,请进行设置。

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

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

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