Solved

Force a new session in ASP.NET when calling via MSXML2.XMLHTTP

Posted on 2003-10-29
3
856 Views
Last Modified: 2008-02-26
I've got an asp page which calls an aspx page via MSXML2.XMLHTTP and processes the xml which is send back by the aspx page. The problem is that when the aspx page is called, always the same session is used. If two users call the asp page at the same time, the aspx page uses the same session for both users. This is probably because the MSXML2.XMLHTTP object does not support session cookies. Setting a cookie with .setRequestHeader "Cookie", "ASP.NET_SessionId=" & SessionID to link the session of the asp page to the aspx page does not work. The header is ignored by the aspx page, it just uses the same sessionid again. How do I force the aspx page to use a different session each time the aspx page is called?

Background: The aspx page creates an object which uses its own cache object the cache object is stored in the session object. Two or more requests to the aspx page are not allowed to share the same cache object. But they do now because the same session is used.
0
Comment
Question by:Breedj
3 Comments
 
LVL 28

Expert Comment

by:iboutchkine
ID: 9643522
What if you concatenate SessionID with Session UserID?
0
 
LVL 4

Accepted Solution

by:
meet_zorrer earned 500 total points
ID: 9646293
Hi !

if you can solve the problem of session then cache or any other ASPX technique will not matter

Here is the article from MSDN that gives your answer:
http://msdn.microsoft.com/library/en-us/dnaspp/html/converttoaspnet.asp

Regards
Farrukh
0
 

Author Comment

by:Breedj
ID: 9649778
I found out the answer myself. I now use the HttpContext.Current.Items instead of HttpContext.Current.Session.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now