473,405 Members | 2,141 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,405 software developers and data experts.

Sharing Session variables with ASP pages?

I have an old ASP project, and I'm adding some functionality in ASP.Net.

I stuff some information into Session variables in the ASP page, then
redirect to the ASP.Net page.

But when I pull up the session variables, they are empty!

Is it possible to share session variables this way?

Thanks,
---Selden
Nov 18 '05 #1
3 1663
ASP and ASP.Net are 2 completely different ISAPIs, each having its own
memory space. So, the short answer is "no." You CAN share any serializable
Session data by passing it from one app to the other via HTTP request. For
example, if you want to set an ASP.Net Session variable from an ASP app, you
could pass it as a QueryString parameter or as part of a form post.

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

"Selden McCabe" <sm*****@integrantInc.com> wrote in message
news:e7**************@TK2MSFTNGP11.phx.gbl...
I have an old ASP project, and I'm adding some functionality in ASP.Net.

I stuff some information into Session variables in the ASP page, then
redirect to the ASP.Net page.

But when I pull up the session variables, they are empty!

Is it possible to share session variables this way?

Thanks,
---Selden

Nov 18 '05 #2
PL

No it's not possible, however you can use several techniques
to make it share (or something to that effect).

The simplest is to use the querystring and a hidden 1x1 pixel image
on the pages, then loop through the sessions and put them into the
querystring.

However printing out the sessions in the querystring is not a secure
solution and of course it won't work if you stuff other things
than strings into the session variables.

Another way is to use hidden form fields but the same security issue there.

There are numerous articles with more and less complicated
solutions for sharing sessions between classic asp and asp.net,
do a google search.

PL.

"Selden McCabe" <sm*****@integrantInc.com> wrote in message news:e7**************@TK2MSFTNGP11.phx.gbl...
I have an old ASP project, and I'm adding some functionality in ASP.Net.

I stuff some information into Session variables in the ASP page, then
redirect to the ASP.Net page.

But when I pull up the session variables, they are empty!

Is it possible to share session variables this way?

Thanks,
---Selden

Nov 18 '05 #3
http://msdn.microsoft.com/library/de...rttoaspnet.asp

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Selden McCabe" <sm*****@integrantInc.com> wrote in message
news:e7**************@TK2MSFTNGP11.phx.gbl...
I have an old ASP project, and I'm adding some functionality in ASP.Net.

I stuff some information into Session variables in the ASP page, then
redirect to the ASP.Net page.

But when I pull up the session variables, they are empty!

Is it possible to share session variables this way?

Thanks,
---Selden

Nov 18 '05 #4

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

Similar topics

5
by: Larry Woods | last post by:
I am losing Session variables, but only those that are set in the page previous to a redirect to a secure page. Anyone seen ANY situation where Session variables just "disappear?" Note that...
14
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you...
3
by: Hardik Shah | last post by:
Hi, I am calling an ASP.Net page from an ASP classic application but need the .Net page to have access to ASP classic's session variables. I am using HTTPWebRequest to call ASP classic page...
10
by: Suresh | last post by:
how to share Session Sharing Across the domain
4
by: abcd | last post by:
I have an ASP application. It instantiaties some COM components and we put those COM components in Session variables...COM components have license restrictions...We have written new ASPX page ( for...
3
by: Liam | last post by:
We are using cookieless sessions, and so the URL shows the session id, e.g. http://ourdomain.com(ixbradnm5qmdfwikrt1mcfi3)/somepage.aspx. When a user comes to our main page, they have to provide...
1
by: Vikas | last post by:
Hi, I am facing a very typical problem. I have a wizard like application, where user enters information by moving back & forth between the pages. At the end of wizard the data is submitted...
8
by: antonyliu2002 | last post by:
We are extending a web application written in classic ASP long time ago. We will add more components to this web application in ASP.NET 2.0. To use the web application, our web users will have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.