Solved

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

Posted on 2003-10-29
3
854 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

12 Experts available now in Live!

Get 1:1 Help Now