473,324 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Accessing Session variables defined in ASP page in the ASPX page

I have a session variable defined in the ASP page. This ASP application then
also uses ASPX pages. I am unable to read the value of the session variable
in the ASPX page. The value shown is empty.

What could be the reason? Please help.

Thanks
Nov 19 '05 #1
7 1741
If you google this question, you will see that it has been asked hundreds of
times.

The answer, is that ASP and ASP.NET run as 2 different processes, and thus
cannot share session.

"Sachin Vaishnav" <Sachin Va******@discussions.microsoft.com> wrote in
message news:8A**********************************@microsof t.com...
I have a session variable defined in the ASP page. This ASP application
then
also uses ASPX pages. I am unable to read the value of the session
variable
in the ASPX page. The value shown is empty.

What could be the reason? Please help.

Thanks

Nov 19 '05 #2
Sachin,

ASP and ASP.NET run in two completely different processes, so they
cannot share session values.

You can work around this by "mapping" values placed in classic ASP
session into ASP.NET session. This would take some additional code and
likely a redirect from the ASP that sets the session value to an ASPX
that will place the same value in ASP.NET session, but it can and has
been done before.

If you need more details, let me know and I'll dig up and post some
source code for you.

Thanks,
Denny

Nov 19 '05 #3
Here's the official Microsoft way to do that :

http://www.microsoft.com/downloads/d...displaylang=en


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Sachin Vaishnav" <Sachin Va******@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
I have a session variable defined in the ASP page. This ASP application then
also uses ASPX pages. I am unable to read the value of the session variable
in the ASPX page. The value shown is empty.

What could be the reason? Please help.

Thanks

Nov 19 '05 #4
Hi Marina,
thanks for the response.
Can you guide me about any work around?

"Marina" wrote:
If you google this question, you will see that it has been asked hundreds of
times.

The answer, is that ASP and ASP.NET run as 2 different processes, and thus
cannot share session.

"Sachin Vaishnav" <Sachin Va******@discussions.microsoft.com> wrote in
message news:8A**********************************@microsof t.com...
I have a session variable defined in the ASP page. This ASP application
then
also uses ASPX pages. I am unable to read the value of the session
variable
in the ASPX page. The value shown is empty.

What could be the reason? Please help.

Thanks


Nov 19 '05 #5
Hi Denny,

Thanks for the details. I would really appreciate if you can post some code,
showing what you have explained.

Thanks,
Sachin
"Denny Boynton" wrote:
Sachin,

ASP and ASP.NET run in two completely different processes, so they
cannot share session values.

You can work around this by "mapping" values placed in classic ASP
session into ASP.NET session. This would take some additional code and
likely a redirect from the ASP that sets the session value to an ASPX
that will place the same value in ASP.NET session, but it can and has
been done before.

If you need more details, let me know and I'll dig up and post some
source code for you.

Thanks,
Denny

Nov 19 '05 #6
On Wed, 17 Aug 2005 12:07:39 -0700, Sachin Vaishnav <Sa************@discussions.microsoft.com>
wrote:

¤ Hi Denny,
¤
¤ Thanks for the details. I would really appreciate if you can post some code,
¤ showing what you have explained.
¤

Check out Juan's post in the thread.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #7

You can also send the values as part of the querystring

--
Rosann
-----------------------------------------------------------------------
Rosanne's Profile: http://www.highdots.com/forums/m28
View this thread: http://www.highdots.com/forums/t270823

Nov 19 '05 #8

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

Similar topics

9
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background...
2
by: Earl Teigrob | last post by:
I am programming ASP.NET using C#. I have been accessing static variables accross my entire application but now need to change some of the static variables that are session specific to instance...
1
by: Arthur | last post by:
I have a mix web site, ASP and ASPX files. I have assigned a value to Session("Date") and the href to an ASPX page. When I further href to another ASP Page. The content in Session("Date") becoming...
3
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object...
6
by: Nedu N | last post by:
Hi, I am trying to design a Home page for my applicatiion in which i want show the links for for some itms... I tried to put the following <td> <font face="Arial, Helvetica, sans-serif" ...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
3
by: Lee Moore | last post by:
I have some user controls defined that represent a common header and footer for a particular site. the footer contains links with querystring parameters based on session variables. The problem is,...
1
by: Santosh | last post by:
Dear All i am writting a code sending mail with attachement. i am writting code for sending mail in one page and code for attaching a file in the next page. aftet attaching a file i am taking...
5
by: gom | last post by:
I am an amatuer asp.net programmer so I hope this question isn't to dumb. I am having difficulty with my understanding of session state. I have an application that stores some values in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.