473,513 Members | 2,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Variables Scope

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
Nov 19 '05 #1
2 1407
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.

"vinu thomas" <vi********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
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

Nov 19 '05 #2
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/de...rtToASPNET.asp

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

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"vinu thomas" <vi********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
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

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2019
by: Nicole | last post by:
Hi I'm trying to use a function to set a session variable. I have three files: The first file has: <?php session_start(); // This connects to the existing session ?> <html> <head>
4
1660
by: Dean | last post by:
I finally got class session variables to work by putting the following in global.asax in the session_start: dim myDBComp as DBComp = new DBComp........ session("myDBComp") = myDBComp In each...
4
3169
by: John Smith Jr. | last post by:
Could someone enlighten me what the difference between viewstate[" and session[" variables in terms of use, performance, and rule of thumb, from what I understand viewstate has overhead to it, and...
2
6155
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
8
3160
by: Dave Wurtz | last post by:
All, I'm new to ASP development and I have a basic design question: Is it ok to store business objects to session variables or is there a better way to keep object information? For example,...
2
1617
by: Don | last post by:
I'm asking this for a friend of mine, so forgive me if I'm getting some of the terminology wrong (I don't have any experience with ASP.NET). I've got an ASP application that has some classes that...
31
6968
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
9
3170
by: Randy | last post by:
Hello, I'm having a strange problem. I've got a .NET web app which uses Session variables. Sometime, not all the time, they get cross threaded...that is...one user will have another user's Session...
18
3402
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
3
3104
by: mikeboston | last post by:
Hi, I am attempting to use php session variables on a server which is running Red Hat Linux, but the variables don't seem to be getting passed between pages. I have tried the same exact test...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7545
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.