Solved

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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