By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,208 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,208 IT Pros & Developers. It's quick & easy.

Problem sharing session between classic ASP and ASP.NET

P: n/a
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 into this new
application.

It is annoying to have to login twice, isn't it?

So, in our ASP.NET 2.0 components, we would like to get the login
information from the classic ASP page. Fortunately, login info is
probably the only data we wanna get from the classic ASP pages.

In our ASP.NET page, we have managed to get the user login info from
the classic ASP page through the trick provided by Peter A. Bromberg at
the following URL:

http://www.eggheadcafe.com/articles/20021207.asp

I have to say it is a great trick.

This trick works nicely in a folder which does not contain web.config.
But it seems the session objects cannot be transferred to any ASPX
pages in a folder that contains web.config. I've tested it a dozen of
times.

Did I make clear what problem I am having? If not clear, please ask.
If you have a good solution to sharing session objects between classic
ASP and ASP.NET, please educate. Thanks a lot.

Oct 12 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Antony,

I know this situation all too well.

You've got to share your session objects...I would configure the
ASP.NET process to use SQL Server as the session provider and run the
asp.net session configuration scripts. I would then plug my ASP
application's session object to essentially write to the same location
as the asp.net application, therefore sharing information between the 2
applications. You will definitely have to write some code for this.

Good luck!

an***********@yahoo.com wrote:
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 into this new
application.

It is annoying to have to login twice, isn't it?

So, in our ASP.NET 2.0 components, we would like to get the login
information from the classic ASP page. Fortunately, login info is
probably the only data we wanna get from the classic ASP pages.

In our ASP.NET page, we have managed to get the user login info from
the classic ASP page through the trick provided by Peter A. Bromberg at
the following URL:

http://www.eggheadcafe.com/articles/20021207.asp

I have to say it is a great trick.

This trick works nicely in a folder which does not contain web.config.
But it seems the session objects cannot be transferred to any ASPX
pages in a folder that contains web.config. I've tested it a dozen of
times.

Did I make clear what problem I am having? If not clear, please ask.
If you have a good solution to sharing session objects between classic
ASP and ASP.NET, please educate. Thanks a lot.
Oct 12 '06 #2

P: n/a
Superman wrote:
Antony,

I know this situation all too well.

You've got to share your session objects...I would configure the
ASP.NET process to use SQL Server as the session provider and run the
asp.net session configuration scripts. I would then plug my ASP
application's session object to essentially write to the same location
as the asp.net application, therefore sharing information between the 2
applications. You will definitely have to write some code for this.

Good luck!
Thanks. Does this mean that I have to install Microsoft SQL Server? I
am reluctant to do this. We use Oracle 10g as our database for our web
application.

Oct 14 '06 #3

P: n/a
an***********@yahoo.com wrote:
Superman wrote:
Antony,

I know this situation all too well.

You've got to share your session objects...I would configure the
ASP.NET process to use SQL Server as the session provider and run the
asp.net session configuration scripts. I would then plug my ASP
application's session object to essentially write to the same location
as the asp.net application, therefore sharing information between the 2
applications. You will definitely have to write some code for this.

Good luck!

Thanks. Does this mean that I have to install Microsoft SQL Server? I
am reluctant to do this. We use Oracle 10g as our database for our web
application.
Yes? Superman? Do I have to install MS SQL Server for this strategy?
We actually use Oracle 10g.

Oct 16 '06 #4

P: n/a
Sorry for the late reply,

No! You don't have to use SqlServer. You can configure your session
provider to use any data source necessary. For aspNet 2.0, take a look
at the "sessionState" element and use the "custom" provider model. You
can implement your own provider to store it in your Oracle database
just the same as a SqlServer implementation.

Good luck!
an***********@yahoo.com wrote:
an***********@yahoo.com wrote:
Superman wrote:
Antony,
>
I know this situation all too well.
>
You've got to share your session objects...I would configure the
ASP.NET process to use SQL Server as the session provider and run the
asp.net session configuration scripts. I would then plug my ASP
application's session object to essentially write to the same location
as the asp.net application, therefore sharing information between the 2
applications. You will definitely have to write some code for this.
>
Good luck!
Thanks. Does this mean that I have to install Microsoft SQL Server? I
am reluctant to do this. We use Oracle 10g as our database for our web
application.

Yes? Superman? Do I have to install MS SQL Server for this strategy?
We actually use Oracle 10g.
Oct 17 '06 #5

P: n/a
Superman wrote:
Sorry for the late reply,

No! You don't have to use SqlServer. You can configure your session
provider to use any data source necessary. For aspNet 2.0, take a look
at the "sessionState" element and use the "custom" provider model. You
can implement your own provider to store it in your Oracle database
just the same as a SqlServer implementation.

Good luck!
Thanks, Superman.

While I read through the MSDN documentation about this issue, I have
one question and I don't see how it is addressed.

OK, when a web user logs in from the classic ASP page, the SessionID
and the login info are written to the database.

Then, my ASP.NET application retrieves such info from the database.
But to retrieve John F Kennedy's login info instead of Marilyn
Monroe's, the ASP.NET application needs to know John's SessionID. But
how does it get to know this since the ASP.NET application is unaware
of what is going on in the classic ASP application? It seems to me
that some sort of communication directly between the classic ASP and
the ASP.NET applications is necessary.

Please share your wisdom. Thanks.

Oct 17 '06 #6

P: n/a
re:
some sort of communication directly between the classic ASP
and the ASP.NET applications is necessary.
Check out this article :

http://msdn2.microsoft.com/en-us/library/aa479313.aspx

....and see how Microsoft recommends that be done.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<an***********@yahoo.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
>Superman wrote:
Sorry for the late reply,

No! You don't have to use SqlServer. You can configure your session
provider to use any data source necessary. For aspNet 2.0, take a look
at the "sessionState" element and use the "custom" provider model. You
can implement your own provider to store it in your Oracle database
just the same as a SqlServer implementation.

Good luck!

Thanks, Superman.

While I read through the MSDN documentation about this issue, I have
one question and I don't see how it is addressed.

OK, when a web user logs in from the classic ASP page, the SessionID
and the login info are written to the database.

Then, my ASP.NET application retrieves such info from the database.
But to retrieve John F Kennedy's login info instead of Marilyn
Monroe's, the ASP.NET application needs to know John's SessionID. But
how does it get to know this since the ASP.NET application is unaware
of what is going on in the classic ASP application? It seems to me
that some sort of communication directly between the classic ASP and
the ASP.NET applications is necessary.

Please share your wisdom. Thanks.

Oct 17 '06 #7

P: n/a

Juan T. Llibre wrote:
re:
some sort of communication directly between the classic ASP
and the ASP.NET applications is necessary.

Check out this article :

http://msdn2.microsoft.com/en-us/library/aa479313.aspx

...and see how Microsoft recommends that be done.

Reading ....... I'll get back to you guys after I run a few tests. Thx.

Oct 19 '06 #8

P: n/a
We are currently using this solution on one of our projects. We are
now at the point of converting the application to .Net 2.0. Has anyone
had any experience with this - i.e. - does the SessionPage solution
still work with 2.0? One other thing that we would like to do for the
sake of easier maintenance is break out the classic ASP application and
run that separately under IIS. Is that possible, or do I need to keep
it in the same application, just under a subdirectory?

Thanks in advance,

Mikkel

On Oct 17, 10:54 am, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
re:
some sort of communication directly between the classicASP
and theASP.NETapplications is necessary.Check out this article :

http://msdn2.microsoft.com/en-us/library/aa479313.aspx

...and see how Microsoft recommends that be done.

Juan T. Llibre,asp.netMVPasp.netfaq :http://asp.net.do/faq/
foros deasp.net, en español :http://asp.net.do/foros/
===================================<antonyliu2...@ yahoo.comwrote in messagenews:11*********************@m73g2000cwd.go oglegroups.com...
Nov 10 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.