Session Variables Scope

G

Guest

Friends,
Is it possible to access a ASP Session variable in ASP.net Page. The project
i am working on uses both ASP and ASP.Net. To gain access in to the site user
has to enter user name and password. We using ASP page to validate user
access right, if its a successful login we then create session variable to
store necessary things. We use ASP.Net for all new development. These entire
asp.net pages require those session variable. I would be grateful if some one
provides a valuable suggestion

Cheers
Vin
 
K

Kevin Spencer

Hi Vin,

Yes and no. You can't access it directly, as ASP and ASP.Net are different
ISAPIS (applications). But web pages can communicate with one another via
Page Request, such as a hyperlink using a QueryString, or a form Post. So,
for example, you have an ASP page that sets an ASP Session variable, and you
want to duplicate that Session variable in your ASP.Net application. The ASP
page can set the Session variable, use Response.Redirect to redirect to an
ASP.Net page that receives the Session data via QueryString, and then have
the ASP.Net page Response.Redirect back to the ASP page (if you wish).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
S

Steve C. Orr [MVP, MCSD]

ASP and ASP.NET do not share Session variables. That doesn't mean you don't
have any options though.

You can transfer values via a common database, or you can transfer values
between the two systems vai querystring, or posting hidden fields, etc.
Here's more information:
http://www.eggheadcafe.com/articles/20021207.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ConvertToASPNET.asp

Or you could use a 3rd party product such as this:
http://www.consonica.com/solutions/statestitch/
 

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

Top