Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Accessing Session variables defined in ASP page in the ASPX page

Reply
Thread Tools

Accessing Session variables defined in ASP page in the ASPX page

 
 
=?Utf-8?B?U2FjaGluIFZhaXNobmF2?=
Guest
Posts: n/a
 
      08-17-2005
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
 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      08-17-2005
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 http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>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



 
Reply With Quote
 
 
 
 
Denny Boynton
Guest
Posts: n/a
 
      08-17-2005
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

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      08-17-2005
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 (E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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



 
Reply With Quote
 
=?Utf-8?B?U2FjaGluIFZhaXNobmF2?=
Guest
Posts: n/a
 
      08-17-2005
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 (E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
> >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

>
>
>

 
Reply With Quote
 
=?Utf-8?B?U2FjaGluIFZhaXNobmF2?=
Guest
Posts: n/a
 
      08-17-2005
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
>
>

 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      08-17-2005
On Wed, 17 Aug 2005 12:07:39 -0700, Sachin Vaishnav <(E-Mail Removed)>
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)
 
Reply With Quote
 
Rosanne
Guest
Posts: n/a
 
      08-17-2005

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with accessing directory defined in ENV variables Thomas Luedeke Ruby 7 08-12-2008 05:01 PM
Accessing Session variables when using SQL Server for Session state Michael ASP .Net 3 12-30-2005 07:56 PM
#if (defined(__STDC__) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) Oodini C Programming 1 09-27-2005 07:58 PM
accessing variables in Custom Control, defined in page. =?Utf-8?B?ZG90bmV0dGVzdGVy?= ASP .Net 1 08-03-2005 07:22 PM
Accessing ASP Session from ASP.NET via Session cookie Dax Westerman ASP General 1 08-19-2003 11:10 AM



Advertisments