470,810 Members | 1,142 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Session Variables between ASP Classic and ASP .NET

I have a classic ASP application that determines whether a user is logged in by examining a Session Variable, Session("LoginId"). Once logged in there is a link to a new search page (.aspx) this page basicaly allows searcing of the database and selection of users from a DataGrid. When a user in the DataGrid is selected (using hyperlink) you are returned to the .asp page, however the Session("LoginId") is empty and the users then have to log in again ? This happens randomly, i.e. if a user logs in again and repeats the process they stay logged in ?

The .aspx files are in a different Virtual Directory to the .asp files; is there any way that I can persist the Session Variables between apps.

Any help appreciated.
Tony
Nov 18 '05 #1
4 1841
Sessions are limited to the Application in which they reside.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Tony" <an*******@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
I have a classic ASP application that determines whether a user is logged in by examining a Session Variable, Session("LoginId"). Once logged in
there is a link to a new search page (.aspx) this page basicaly allows
searcing of the database and selection of users from a DataGrid. When a
user in the DataGrid is selected (using hyperlink) you are returned to the
..asp page, however the Session("LoginId") is empty and the users then have
to log in again ? This happens randomly, i.e. if a user logs in again and
repeats the process they stay logged in ?
The .aspx files are in a different Virtual Directory to the .asp files; is there any way that I can persist the Session Variables between apps.
Any help appreciated.
Tony

Nov 18 '05 #2
Cor
Hi Tony,

The session variables can time out, you can also (better) use the viewstat

(In asp.net)

http://msdn.microsoft.com/library/de...sp11222001.asp
I hope this helps?

Cor
I have a classic ASP application that determines whether a user is logged in by examining a Session Variable, Session("LoginId"). Once logged in
there is a link to a new search page (.aspx) this page basicaly allows
searcing of the database and selection of users from a DataGrid. When a
user in the DataGrid is selected (using hyperlink) you are returned to the
..asp page, however the Session("LoginId") is empty and the users then have
to log in again ? This happens randomly, i.e. if a user logs in again and
repeats the process they stay logged in ?
The .aspx files are in a different Virtual Directory to the .asp files; is there any way that I can persist the Session Variables between apps.
Any help appreciated.
Tony

Nov 18 '05 #3
To help get around the issue I am using intermediate pages to transfer
session variables from asp to asp.net and vice versa. I pass the values
through/via a query string parameter to an intermediate page and then set
the appropriate variable. This is a crappy way to get the two apps to talk,
but it works for now. Also, one drawback is that you are not able to pass
objects (unless you serialize to a hidden textbox or serialize to a query
string and re-populate at the recieving side) from each server application.

"Tony" <an*******@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
I have a classic ASP application that determines whether a user is logged in by examining a Session Variable, Session("LoginId"). Once logged in
there is a link to a new search page (.aspx) this page basicaly allows
searcing of the database and selection of users from a DataGrid. When a
user in the DataGrid is selected (using hyperlink) you are returned to the
..asp page, however the Session("LoginId") is empty and the users then have
to log in again ? This happens randomly, i.e. if a user logs in again and
repeats the process they stay logged in ?
The .aspx files are in a different Virtual Directory to the .asp files; is there any way that I can persist the Session Variables between apps.
Any help appreciated.
Tony

Nov 18 '05 #4
To help get around the issue I am using intermediate pages to transfer
session variables from asp to asp.net and vice versa. I pass the values
through/via a query string parameter to an intermediate page and then set
the appropriate variable. This is a crappy way to get the two apps to talk,
but it works for now. Also, one drawback is that you are not able to pass
objects (unless you serialize to a hidden textbox or serialize to a query
string and re-populate at the recieving side) from each server application.

"Tony" <an*******@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
I have a classic ASP application that determines whether a user is logged in by examining a Session Variable, Session("LoginId"). Once logged in
there is a link to a new search page (.aspx) this page basicaly allows
searcing of the database and selection of users from a DataGrid. When a
user in the DataGrid is selected (using hyperlink) you are returned to the
..asp page, however the Session("LoginId") is empty and the users then have
to log in again ? This happens randomly, i.e. if a user logs in again and
repeats the process they stay logged in ?
The .aspx files are in a different Virtual Directory to the .asp files; is there any way that I can persist the Session Variables between apps.
Any help appreciated.
Tony

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jessica Loriena | last post: by
4 posts views Thread by rkmoray | last post: by
31 posts views Thread by Harry Simpson | last post: by
4 posts views Thread by abcd | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.