U
Uwe
Howdy!
I've googled and googled for this without success, and either it's so easy
that nobody has ever asked, or there is some serious reason nobody would do
this. But I'm going to ask anyway.
I'd like to move my ASP.NET session ID from the default cookie into the URL.
I tried the "cookieless" approach and it doesn't work for me for two
reasons:
1. I have FrontPage-based forms that posts to my ASP.NET application, and a
cookieless ASP.NET session apparently cannot be started with a POST. I
believe there's a redirect in there somewhere.
I don't want to convert these forms to webforms because there are others
that can create and maintain FP forms, but I'm the only one who can write
ASP.NET code.
2. All my Javascript code (i.e. rollovers) is screwed up because the Jscript
uses relative paths to get at the various button images but the cookieless
directory is one extra level down in the tree.
What I would like to do is to modify my ASP.NET application to retrieve the
session ID from either a query parameter or a hidden form field if this is a
postback. When the app starts up, I can obtain the session ID and put it
into a form variable or somehow append it to the URL used for the postback.
When the postback occurs, I'd like to get control before the session is
established, query the form or the query parameter collection (assuming it
exists before the session is established), establish the session and
everybody's happy. If the session ID is not valid, I can just let ASP.NET
create a new one.
Ideally, I could even check the form field, query parameter, and cookie for
a session ID (using some uniquely named key value).
So can someone point me in the right direction? Ideally, there will be a
virtual function I can override somewhere (maybe global.asax), something
like GetSessionID().
Thanks in advance...
--- Uwe
I've googled and googled for this without success, and either it's so easy
that nobody has ever asked, or there is some serious reason nobody would do
this. But I'm going to ask anyway.
I'd like to move my ASP.NET session ID from the default cookie into the URL.
I tried the "cookieless" approach and it doesn't work for me for two
reasons:
1. I have FrontPage-based forms that posts to my ASP.NET application, and a
cookieless ASP.NET session apparently cannot be started with a POST. I
believe there's a redirect in there somewhere.
I don't want to convert these forms to webforms because there are others
that can create and maintain FP forms, but I'm the only one who can write
ASP.NET code.
2. All my Javascript code (i.e. rollovers) is screwed up because the Jscript
uses relative paths to get at the various button images but the cookieless
directory is one extra level down in the tree.
What I would like to do is to modify my ASP.NET application to retrieve the
session ID from either a query parameter or a hidden form field if this is a
postback. When the app starts up, I can obtain the session ID and put it
into a form variable or somehow append it to the URL used for the postback.
When the postback occurs, I'd like to get control before the session is
established, query the form or the query parameter collection (assuming it
exists before the session is established), establish the session and
everybody's happy. If the session ID is not valid, I can just let ASP.NET
create a new one.
Ideally, I could even check the form field, query parameter, and cookie for
a session ID (using some uniquely named key value).
So can someone point me in the right direction? Ideally, there will be a
virtual function I can override somewhere (maybe global.asax), something
like GetSessionID().
Thanks in advance...
--- Uwe