The AspxAutoCookieProblem in ASP.NET pages
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开发者_如何学JAVA 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.
In your web.config you need to do this:
<sessionState mode="InProc" cookieless="false" ... />
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.
精彩评论