Passing Session State Variables from ASP to ASP.Net
-
I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.
-
I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.
Hi, As far as i know.. its not really doable.. but you can try to do some logic of storing the session value in a persistent storage and pass it to asp.net!
Visit me:
http://www2.domaindlx.com/earavi/
When you know something.. its meant to share with others :-) for otherwise that knowledge has no worth:-)
mail me:
aravinthan@rediffmail.com
-
I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.
Hi, As far as i know.. its not really doable.. but you can try to do some logic of storing the session value in a persistent storage and pass it to asp.net! Store in a Database ! etc.. aravinthan.
Visit me:
http://www2.domaindlx.com/earavi/
When you know something.. its meant to share with others :-) for otherwise that knowledge has no worth:-)
mail me:
aravinthan@rediffmail.com
-
Hi, As far as i know.. its not really doable.. but you can try to do some logic of storing the session value in a persistent storage and pass it to asp.net! Store in a Database ! etc.. aravinthan.
Visit me:
http://www2.domaindlx.com/earavi/
When you know something.. its meant to share with others :-) for otherwise that knowledge has no worth:-)
mail me:
aravinthan@rediffmail.com
I actually came up with a simple work-around that works as long as you are not storing a large amount of data in session variables. On my ASP Classic login page, I added the following line of JavaScript: window.open('setsession.aspx?UserID=<%=Session("UserID")%>&CompanyID=<%=Session("CompanyID")%>&FullName=<%=Session("FullName")%>&LoggedIn=<%=Session("LoggedIn")%>') This passes my four session variables into an ASPX page named setsession.aspx. The code for this form simply assigns the .Net session state variables and then closes the form: Sub Page_Load Session("UserID") = Request("UserID") Session("CompanyID") = Request("CompanyID") Session("FullName") = Request("FullName") Session("LoggedIn") = Request("LoggedIn") End Sub SetSession.aspx
window.close()
-
I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.
Here is an offical take on your problem: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp