davej
davej

Reputation: 1380

url shows weird string

I'm testing my asp.net website on my local server (Windows Server 2008, IIS 7.0.6), and when I type in just the IP address in my browser, e.g.,

192.168.0.5

it comes back like this:

http://192.168.0.5/(S(u0nmzwxobbwpuk1mtvuybwn0))/default.aspx

The weird stuff between .0.5/ and /default.aspx changes every time I type in the ip and hit enter.

The content shows up correctly, but obviously there's a problem with the url.

Upvotes: 2

Views: 657

Answers (3)

Abe Miessler
Abe Miessler

Reputation: 85126

Sounds like you might be using cookieless sessions.

Basically ASP.NET is storing your session id in the query string instead of storing it in a cookie. Looks gross, but allows you to use session state when someone does not accept cookies. You can read more here.

Upvotes: 3

Akhil
Akhil

Reputation: 7610

Seems like you Have Cookieless Sessions enabled. Below article illustrates the behavior:

MSDN - Cookie Less Sessions in ASP.NET

Changing the Setting in Web.Config can change the behavior:

<sessionState cookieless="true" />

Upvotes: 1

Oded
Oded

Reputation: 499392

Guessing here - in your web.config file, you have set the sessionState cookieless attribute to UseUri or to true.

See the documentation on the sessionState element.

Upvotes: 2

Related Questions