开发者

Weird ASP.NET MVC links with (A(anythingworkshere))

Google's webmaster tools has started showing some very strange internal links for my site. It appears "normal", but I'm not sure what to make of it. If you use parentheses and put in a single letter, then put literally anything in parentheses after that, the link works. I did a search for any other MVC sites so I could see if they had the same behavior. Microsoft's site came up at the top of the list with an odd link as well. The search terms were "asp.net mvc site" and 开发者_如何学Gothe first link I got was for:

http://www.asp.net/(S(d35rmemuuono1wvm1gsp2n45))/mvc

I don't like this at all. You can change the S to an A or any other letter, and then put any text you want in the next section. Anyone know how to stop it? For the life of me I can't see anything wrong with my routes. I used MVC so I wouldn't have strange url's floating around in search engines so this is pretty disappointing.

Nearest I can guess from the Google "internal links" list is that it may be a cookie. But I can't find any circumstance when I view the source on my site where I see anything but the proper relative links.


That looks like the Session ID format used when cookieless sessions are turned on (<sessionState cookieless="true" /> in Web.config). This appears to be general ASP.NET behavior, not just MVC, as I was able to reproduce this behavior with a standard 3.5 Website project in VS 2010.

It seems that ASP.NET will process values in that form as if it were a Session ID, even if you do not have cookieless sessions turned on.

It's hard to diagnose the situation without seeing your actual site configuration and logs, but if I had to guess, I'd say that the Google webmaster tools are not returning the session cookie to your site in the request, so the site is falling back to cookieless method in an attempt to maintain the session.


This is for cookieless sessions.

Since google is scanning with a bot, its using the cookieless session.

More info:

Asp.net cookieless sessionId url location

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜