ASP.NET 页面中的 AspxAutoCookie 问题
我刚刚加入一个团队来管理一个 ASP.NET 4 网站,该网站有 1000 多个 url 格式的页面
http://www.abcdefgh.com/ShowBooks.aspx?ID=1420
,但它被更改为
http://www.abcdefgh.com/(S(sdfdsf9835fgfdjgdfgderd55)X(1))/ShowBooks.aspx?ID=1420
或
http://www.abcdefgh.com/ShowBooks.aspx?ID=1420&AspxAutoDetectCookieSupport=1420
我想这是几个月后发生的事情,并且该网站的流量很大。我怎样才能防止这个网址发生变化。我希望所有 url 都采用这种格式
http://www.abcdefgh.com/ShowBooks.aspx?ID=1420
我注意到 web.config 中的三个条目
<authentication mode="Forms">
<forms cookieless="UseCookies" loginUrl="~/NoAccess.aspx" name="FORMAUTH"/>
</authentication>
<sessionState cookieless="AutoDetect"/>
<anonymousIdentification cookieless="AutoDetect" enabled="false"/>
如果我从这些 url 中删除 cookieless 属性,会有什么缺点。它会破坏之前添加书签的网址吗?Google SEO 是否会受到任何影响?
请帮我提供详细信息。
I just joined a team to manage a asp.net 4 website with 1000+ pages of the url format
http://www.abcdefgh.com/ShowBooks.aspx?ID=1420
but it gets changed to
http://www.abcdefgh.com/(S(sdfdsf9835fgfdjgdfgderd55)X(1))/ShowBooks.aspx?ID=1420
or
http://www.abcdefgh.com/ShowBooks.aspx?ID=1420&AspxAutoDetectCookieSupport=1420
This I suppose is happening from a couple of months and the traffic is heavy on this site. How can i prevent this url changing from happening. I want all url's to be of this format only
http://www.abcdefgh.com/ShowBooks.aspx?ID=1420
I have noticed three entries in my web.config
<authentication mode="Forms">
<forms cookieless="UseCookies" loginUrl="~/NoAccess.aspx" name="FORMAUTH"/>
</authentication>
<sessionState cookieless="AutoDetect"/>
<anonymousIdentification cookieless="AutoDetect" enabled="false"/>
What disadvantage will it have if I remove cookieless attribute from these url's. WIll it break the earlier bookmarked urls or will Google SEO be affected in any way?
Please help me with details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的 web.config 中,您需要执行以下操作:
这将删除查询字符串参数,但是它将强制您的用户接受 cookie,以便应用程序中的会话正常工作。
如果您根本不使用会话,则只需将 sessionState 设置为 None 即可。
In your web.config you need to do this:
That removes the query string parameter, however it will force your users to accept cookies in order for sessions in your app to work correctly.
If you're not using sessions at all then just set sessionState to None.