Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove the ASP.NET Session ID from my URL?

How can I remove the identifier from my URL?

In this example URL I need just index.aspx, how do I remove (S(w0uz0245gtucb3am0k5w5g55))?

http://www.example.com/(S(w0uz0245gtucb3am0k5w5g55))/index.aspx

like image 248
Sers Avatar asked Sep 04 '12 16:09

Sers


People also ask

What is view session ID in URL?

A session ID is a unique number that a Web site's server assigns a specific user for the duration of that user's visit (session). The session ID can be stored as a cookie, form field, or URL (Uniform Resource Locator).

Why should session ids not be exposed in the URL?

This method is not inherently insecure but if the session token is not validated by the server, it could lead to potentially high-risk vulnerabilities. If you place a session token directly in the URL, it increases the risk of an attacker capturing and exploiting it. Anyone who follows that URL inherits the session.

Where does ASP.NET store session ids?

By Default Session Id is Stored in Client m/c in the form of text file.It is Called Cookie. If session is Cookie less the that is append to Url . In Cookies.


1 Answers

Your webserver is rewriting your urls to include the session state because you have configured your site to not use cookies.

If you look at your site's web.config file, you will probably find this line:

<sessionState cookieless="true" />

If you change the value to "false" if will solve your problem (or just remove the line entirely - the default value is false)

More information about this configuration can be found here and here.

like image 86
jonkroll Avatar answered Nov 07 '22 15:11

jonkroll