views:

549

answers:

3

I'm working on a mobile site where we can't rely on the phone hitting the site to have cookie support. I'm using the cookieless option for sessions and wondering if there's a way to specify where in the URL that the sessionId gets placed?

Here's what it looks like now:

http://www.somesite.com/(S(qnxbzt45h2yxpr45tj3hpr45))/Default.aspx

Is there a way to have the sessionId at the end of the url?

http://www.somesite.com/Default.aspx?S=qnxbzt45h2yxpr45tj3hpr45
+1  A: 

Can you not store user sessions using a Sql Database instead? I don't think you can change the sessionId position, you could try re-writing the url's but I'm not sure how that would affect .Net's handling of it

EDIT: I just remembered that the Sql option still requires a cookie on the client machine so ignore me

Nick Allen - Tungle139
A: 

The whole mecanism is extensible, but I am not sure it is worth the effort. Why do you want it there?

eglasius
It's not really affecting functionality, it's just weird and hard to explain to the business/marketing types why the URL gets all munged up sometimes.
Nick
I see, it will happen for the authentication ticket as well. Its just the way the built in modules work.
eglasius
A: 

Session options are set in the web.conf sessionState section. This is detailed here:

http://msdn.microsoft.com/en-us/library/h6bb9cz9(vs.71).aspx

Theres no way to setup the sessions like this with the built in session functionality of asp.net. Your best bet is to define your own session mechanism