开发者

Session ID embedded in URL's is very annonying

开发者 https://www.devze.com 2023-03-05 04:28 出处:网络
I have an ASP.NET 4 site with url\'s having session string embedded in them. Due to this Google index the same page multiple times, all with different session id\'s. This is affecting my ranking. Earl

I have an ASP.NET 4 site with url's having session string embedded in them. Due to this Google index the same page multiple times, all with different session id's. This is affecting my ranking. Earlier i also had the aspautodetectcookie string appended to the url. But i was able to remove it, however the session id embedded in the url remains a problem still.

If my url is http://www.somesite.com/ViewProduct.aspx?ID=12, it shows up like this http://www.somesite.com/S(yya4h4rf4gjh5eo4uazix2t055)X(1))/ViewProduct.aspx?ID=12. I want it to show like http://www.somesite.com/ViewProduct.aspx?ID=12 all the time.

Here are some settings in my web.config that may help you help me

<authentication mode="Forms">             
<forms cookieless="UseCookies" loginUrl="~/AccessDenied.aspx" name="FORMAUTH" />
</authentication>  

<sessionState mode="InProc" cookieless="false" timeout="15" /> 

<anonymousIdentification cookieless="AutoDetect" enabled="false" />

Now one user asked to change cookieless="true" to fix the problem. However in the artcle http://www.beansoftware.com/ASP.NET-Tutorials/Cookieless-Session-State.aspx the guy says that by adding cookieless = "true" session id 'will be' embedded in all page URLs.

Can anyone tell me how remove this session from the url 开发者_如何学编程- forever.

I am running on IIS 7 but do not have much access to the admin features.


If you set cookieless="false" that will solve the problem you are seeing with Google.

However this means that any browser, which doesn't support cookies, will get a new session per request. If you want more help, please tell us how you are using the sessions.

0

精彩评论

暂无评论...
验证码 换一张
取 消