473,734 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session sharing from ASP to ASP.NET

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 better GUI and faster
development) and we will be using that ASPX page along with our ASP
application...h ow can I pass that Session variable (which holds COM
instance) to ASPX page so that I will be working on same instance and will
not consume licenses....

thanks in advance

cheers !
Nov 19 '05 #1
4 1758
Classic ASP pages and ASP.NET pages do not share session data. You must
create your own "bridge" between the two architectures.

One thought would be to use ASP.NET pages in place of the Classic ASP pages
that make the instances of the COM objects and use .NET COM InterOp to
instantiate the COM objects within the ASP.NET pages.
"abcd" <ab**@abcd.co m> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
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 better GUI and faster
development) and we will be using that ASPX page along with our ASP
application... how can I pass that Session variable (which holds COM
instance) to ASPX page so that I will be working on same instance and will
not consume licenses....

thanks in advance

cheers !

Nov 19 '05 #2
I can not change to ASP.NET pages to hold the COM instances. Its a huge
application and we dont want to spend more time on re-engineering. I have
added new functionaly in ASP.NET page and that requires the ASP session
variables...

any sanples !

Microsoft must have considered such design consideration when they developed
ASP.NET. as there are millions of asp based applications.

thanks
Scott M. wrote:
Classic ASP pages and ASP.NET pages do not share session data. You
must create your own "bridge" between the two architectures.

One thought would be to use ASP.NET pages in place of the Classic ASP
pages that make the instances of the COM objects and use .NET COM
InterOp to instantiate the COM objects within the ASP.NET pages.
"abcd" <ab**@abcd.co m> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
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
better GUI and faster development) and we will be using that ASPX
page along with our ASP application...h ow can I pass that Session
variable (which holds COM instance) to ASPX page so that I will be
working on same instance and will not consume licenses....

thanks in advance

cheers !

Nov 19 '05 #3
I'm sorry, but I'm not stating my opinion on this, it is a fact: Classic
ASP and ASP.NET do not share session data.

The reason is actually quite easy to understand. Classic ASP pages process
their code within the context of the Classic ASP "Engine" (ASP.dll). This
component is what exposes the familiar Classic ASP intrinsic objects
(Request, Response, Server, Application, Session & ASPError). ASP.NET
pages do not process using this engine. Instead they process via the
ASP.NET "Engine" (ASPNET_ISAPI.d ll), which also exposes intrinsic objects
(like Application & Session) BUT they are NOT the SAME objects (not the same
instances and not the same memory addresses), so you may have 1 application
that has both .asp and .aspx pages in it and the .asp pages my be using
Session and the .aspx pages may also be using Session, but these are 2
different Session objects and there is no built in way to port data from one
to the other.

For most people who need to share session data, they will simply persist the
data to some common repository that both architectures can get at (such as a
database). But, since you are needing to persist not just name/value pairs
of data, but instead need to persist COM objects, this becomes more
difficult.

The only way you can use a COM object in ASP.NET is if you have a COM
reference to the COM object (thus creating a Runtime Callable Wrapper or
RCW) in the ASP.NET project. When this is done, you can instantiate the COM
object from within ASP.NET and use it (remembering to use the Marshall class
to release the COM object when you are done with it). But, to *pass* the
COM object to ASP.NET from Classic ASP, you'll need to find a place to store
the COM object that ASP.NET can get to and the Classic ASP Session object is
not it.

"abcd" <ab**@abcd.co m> wrote in message
news:OA******** ******@TK2MSFTN GP09.phx.gbl...
I can not change to ASP.NET pages to hold the COM instances. Its a huge
application and we dont want to spend more time on re-engineering. I have
added new functionaly in ASP.NET page and that requires the ASP session
variables...

any sanples !

Microsoft must have considered such design consideration when they
developed ASP.NET. as there are millions of asp based applications.

thanks
Scott M. wrote:
Classic ASP pages and ASP.NET pages do not share session data. You
must create your own "bridge" between the two architectures.

One thought would be to use ASP.NET pages in place of the Classic ASP
pages that make the instances of the COM objects and use .NET COM
InterOp to instantiate the COM objects within the ASP.NET pages.
"abcd" <ab**@abcd.co m> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
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
better GUI and faster development) and we will be using that ASPX
page along with our ASP application...h ow can I pass that Session
variable (which holds COM instance) to ASPX page so that I will be
working on same instance and will not consume licenses....

thanks in advance

cheers !


Nov 19 '05 #4
Good info there Scott.
Patrick

"Scott M." <s-***@nospam.nosp am> wrote in message
news:OB******** ******@TK2MSFTN GP12.phx.gbl...
I'm sorry, but I'm not stating my opinion on this, it is a fact: Classic
ASP and ASP.NET do not share session data.

The reason is actually quite easy to understand. Classic ASP pages process their code within the context of the Classic ASP "Engine" (ASP.dll). This
component is what exposes the familiar Classic ASP intrinsic objects
(Request, Response, Server, Application, Session & ASPError). ASP.NET
pages do not process using this engine. Instead they process via the
ASP.NET "Engine" (ASPNET_ISAPI.d ll), which also exposes intrinsic objects
(like Application & Session) BUT they are NOT the SAME objects (not the same instances and not the same memory addresses), so you may have 1 application that has both .asp and .aspx pages in it and the .asp pages my be using
Session and the .aspx pages may also be using Session, but these are 2
different Session objects and there is no built in way to port data from one to the other.

For most people who need to share session data, they will simply persist the data to some common repository that both architectures can get at (such as a database). But, since you are needing to persist not just name/value pairs of data, but instead need to persist COM objects, this becomes more
difficult.

The only way you can use a COM object in ASP.NET is if you have a COM
reference to the COM object (thus creating a Runtime Callable Wrapper or
RCW) in the ASP.NET project. When this is done, you can instantiate the COM object from within ASP.NET and use it (remembering to use the Marshall class to release the COM object when you are done with it). But, to *pass* the
COM object to ASP.NET from Classic ASP, you'll need to find a place to store the COM object that ASP.NET can get to and the Classic ASP Session object is not it.

"abcd" <ab**@abcd.co m> wrote in message
news:OA******** ******@TK2MSFTN GP09.phx.gbl...
I can not change to ASP.NET pages to hold the COM instances. Its a huge
application and we dont want to spend more time on re-engineering. I have
added new functionaly in ASP.NET page and that requires the ASP session
variables...

any sanples !

Microsoft must have considered such design consideration when they
developed ASP.NET. as there are millions of asp based applications.

thanks
Scott M. wrote:
Classic ASP pages and ASP.NET pages do not share session data. You
must create your own "bridge" between the two architectures.

One thought would be to use ASP.NET pages in place of the Classic ASP
pages that make the instances of the COM objects and use .NET COM
InterOp to instantiate the COM objects within the ASP.NET pages.
"abcd" <ab**@abcd.co m> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
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
better GUI and faster development) and we will be using that ASPX
page along with our ASP application...h ow can I pass that Session
variable (which holds COM instance) to ASPX page so that I will be
working on same instance and will not consume licenses....

thanks in advance

cheers !



Nov 19 '05 #5

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

Similar topics

3
1332
by: Keith Patrick | last post by:
I have an app (A) that has a link to another (B) app that it spawns in a new window. The new window has a link back to app A, opening a third window (let's call it A2). The problem is, I need A2 to act like the same user logged into a clean browser window to app A such that it has a new Session rather than sharing the same one among the 3 windows. Customer requirement that it works that way, so I have no other choice but to come up with...
4
2608
by: Daniel | last post by:
Hi I am having a problem sharing session between SSL and non-SSL asp.net pages I have F5 BigIP with sticky sessions working fine, but the problem is tha sticky session applies at the port level (80 vs. 443) so when a user goes t a SSL page I lose session vars because it's on another server on the farm When the user stays on the same server for both non-SSL and SSL the sessio is shared OK Has anyone come across this problem and are...
3
3444
by: Mark | last post by:
Ok, I know that .net inherently does not share session data across asp.net projects, but is there any decent work around to this. We already have a big chunk of our application using the asp.net session object (using state service). I'd like to start breaking out our functionality into component projects, but I'd like to get this session issue worked out first. Any ideas?? I found this article , but it sounds like kind of a pain.
6
4066
by: Andrew Robinson | last post by:
I am running two servers with a hardware network load balancing device. I know that to share session information between the two servers I need to implement some type of SQL based session information, but I would simply like to share the SessionID. Mainly for some logging applications. The SessionID does currently seem to be shared between the two servers and I haven't changed anything with my configuration or implemented anything...
3
2975
by: CharlieHoo | last post by:
Hello, How to share session state between two or more ASP.NET applications in the same server or different ones? Thanks a lot. Charlie
7
7776
by: Doug | last post by:
An ASP.NET session cookie set on "www.mydomain.com" can not be accessed on "search.mydomain.com"; hence, a new session and cookie are being created on every sub-domain. This is occuring because ASP.NET always sets the Session cookie domain to the full domain (e.g. "www.mydomain.com") instead of the parent domain (e.g. "mydomain.com") The problem with this is when the visitor goes to a different sub-domain (e.g. "search.mydomain.com"),...
5
1289
by: Soren S. Jorgensen | last post by:
Hi, I've got a web-app thats activated by a call to a aspx page from ASP, I need to go back to the ASP session and get some simple data saved in that session. I have no possiblity to do session sharing through Sql server or file ect, but I think I'm able to get the ASP session ID as a parameter on the initial call of the aspx page (without this I guess there's no way for sure)
7
4407
by: Nils Hedström | last post by:
I have a web farm that uses a state server for session management. A user logs on to a website (www1.mysite.com). When the same user visits www2.mysite.com I want the user to be logged in. Right now it he is not logged in on www2.mysite.com (both sites use the same state server). The reason for this seems to be that the user gets a new SessionId when he visits a new web server (www2.mysite.com for example). If there was a way to add a...
7
2240
by: Victor | last post by:
I've got two domain names sharing the same IP address that use ASP VBScript If I set a session variable with domain 1, it is only available for domain 1 - this is correct? If I set an application variable with domain 1, the app variable is sharing across all domains using that IP address - this is correct? This is the behavior I am seeing and I want to make sure that my server is set up correct. I especially want to make sure...
8
2428
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 to log in with their user name and password. Well, instead of adding components to the existing classic ASP web application, we could have just put the extended components into a new web application. But then this would require them to log...
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.