Session.Abandon not working

P

pulaki

Greetings and thank you!

I am passing form data to a distant server that is out of my control. The
destination server (posting to) rejects all postings beyond ONE from the same
session ID. I am trying to get around this...my postings are valid but I
can't get the programmers on the other end to accomodate me.

I am doing the following:

Data is posted, from elsewhere, to me in an ASP page.
I process the data then redirect to a 2nd page (on my server) w/ a QryStr
The 2nd page populates a dummy form w/the QryStr data and OnLoad submits.

I have a Session.Abandon command JUST BEFORE the redirect to MY 2nd page
(the one that populates the dummy form and submits itself)

My subsequent postings beyond the first are still being rejected due to
"Same Session ID"

Any thoughts?

Also, you may ask, Why don't I use an object such as ("MSXML2.XMLHTTP.3.0")
to post directly and bypass the dummy form. I am doing this already w/great
success w/many other customers....with this customer it fails and I spent
3-days trying to find out why. The dummy form worked so I went with it.
 
P

Pandurang Nayak

Hi,

It has got to do with the way sessions work. Sessions set a client-side
cookie with the session key. Session.Abandon does not really abandon the
session at the moment, but abandons it at the end of that page's processing.
However, since you are doing a Response.Redirect, the new page will start
with a fresh session - but at the same time, the client will still provide
the same session ID.

This makes it a new session (all variables cleared), but with the same
session ID.

I also don't know how exactly the application that you are posting to is
processing your requests. That application will not have access to your web
server (obviously) to know if it is a "new" session or an "existing" session.
If it parsed your headers, it would just find the same session key and would
assume it is the same session.

Check http://support.microsoft.com/?kbid=899918 for a detailed explanation
of how Session.Abandon and session reuse works.

Regards,
Pandurang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top