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

前端 未结 2 1058
旧巷少年郎
旧巷少年郎 2020-12-11 18:05

How can I remove the identifier from my URL?

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

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 18:37

    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:

    
    

    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.

提交回复
热议问题