Intranet web URL length

Soldato
Joined
7 Mar 2007
Posts
9,917
Location
Belfast
Ok so I've been redesigning a website used internally with the company I work at. I developed it using ASP.net with C# and pretty much all is well.

However, I've deployed the site with IIS and despite a few config issues I got it up and running. Problem is, after the landing page (just a login page), the url becomes really long, almost like some encrypted string is being added to it:

312v51f.jpg


The top url is the landing page and the one below is the page the user gets directed to after logging in.

The string is longer than the image and eventually ends with "../index.aspx".

Just wondering if there is a setting I need to turn on/off in IIS to stop this? It works fine running it in a development environment in Visual Studio.

Cheers
 
Soldato
Joined
18 Oct 2002
Posts
15,412
Location
The land of milk & beans
Your site has been set up to use cookie-less sessions. You need to amend your web.config for the site:

Code:
<sessionState cookieless="false" />

You can do it in machine.config too, but that will affect all sites on the server. http://msdn.microsoft.com/en-us/library/aa479314.aspx

It's not necessarily a bad thing, it just ends up in bloody ugly URLs. Quite why it's set like that I don't know as it serves little purpose as 99% of people these days have cookies enabled as they are not a threat - despite what the stupid EU cookie law says.
 
Soldato
OP
Joined
7 Mar 2007
Posts
9,917
Location
Belfast
Thanks for the info!

I tried adding that in, but it still gave the same problem, however, I looked down and found this:

Code:
cookieless="UseUri"

This was in the <forms> tag. taking it out seemed to make it work!

Thanks for pointing me in the right direction :)
 
Back
Top Bottom