This works correctly in debug mode and all links in my website have the session id embedded in them. But when I publish to IIS none of the links will have the session ids.
I double checked my session state settings in IIS and they're set to "Use URI". Other than that I don't know what else I can change.
According to your description, the issue is not related to the session state "Use URI". Actually, to enable cookieless sessions, add
cookieless="true", or cookieless="UseUri" (both options have the same meaning) inside
sessionState tag in web.config file. I suppose the issue is related to the URL. So, please check your code to see if there is anything breaking.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Hi Dillion,I actually do have all those settings in my web.config. Everything works correctly when I'm debugging in VS via IIS express. But when I publish to IIS 6, the session ids don't appear in the web links.
None
0 Points
2 Posts
Session ID not embedded into URLs when deployed with IIS
Sep 16, 2014 03:15 PM|dassie|LINK
I have an app that uses cookieless sessions. Ergo when I create links I use ApplyAppPathModifier like so:
This works correctly in debug mode and all links in my website have the session id embedded in them. But when I publish to IIS none of the links will have the session ids.
I double checked my session state settings in IIS and they're set to "Use URI". Other than that I don't know what else I can change.
Has anyone run into this issue before?
All-Star
45489 Points
7008 Posts
Microsoft
Re: Session ID not embedded into URLs when deployed with IIS
Sep 17, 2014 07:08 AM|Zhi Lv - MSFT|LINK
Hi dassie,
Welcome to ASP.NET forums.
According to your description, the issue is not related to the session state "Use URI". Actually, to enable cookieless sessions, add cookieless="true", or cookieless="UseUri" (both options have the same meaning) inside sessionState tag in web.config file. I suppose the issue is related to the URL. So, please check your code to see if there is anything breaking.
@Response.ApplyAppPathModifier("/LoadtestDatabase/Connect")
For more information, please refer to the following articles:
Cookieless Session State Explained: http://www.beansoftware.com/ASP.NET-Tutorials/Cookieless-Session-State.aspx
Cookieless ASP.NET: http://msdn.microsoft.com/en-us/library/aa479314.aspx
Best Regards,
Dillion
None
0 Points
2 Posts
Re: Session ID not embedded into URLs when deployed with IIS
Sep 17, 2014 02:42 PM|dassie|LINK
Hi Dillion,I actually do have all those settings in my web.config. Everything works correctly when I'm debugging in VS via IIS express. But when I publish to IIS 6, the session ids don't appear in the web links.