Solved

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

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

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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