ASP and ASP.NET session pool

D

David Kleyman

Hello

I am trying to gradually convert an existing ASP application in to ASP.NET
one page at the time
I am having a problem doing that. ASP and ASPX pages don't seem to be
sharing the session pool

For example
In the old application login page was checking login credentials and if they
were correct creating a session variable UserID like this
Dim userid
userid = Request("UserID")
Session("UserID") = userid

then response was redirected to the main application page
Response.Redirect("main.asp")

in the new login.aspx web form I am doing pretty much the same thing but
after the redirect to the main.asp it complains that Session("UserID") is
not there

I guess my questions are
Can asp and aspx pages share Session values?
Can I gradually migrate ASP web site to ASP.NET or do I have to do the whole
thing at once?

Thank you

David
 
C

Curt_C [MVP]

inline.........

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


David Kleyman said:
I guess my questions are
Can asp and aspx pages share Session values? No

Can I gradually migrate ASP web site to ASP.NET or do I have to do the whole
thing at once?
You CAN share, but I wouldn't recommend it due to the mess it can create.
 
D

David Kleyman

How can I do it.
Application is messy enough already and I need to make "changes and
enhancements" to it every week and I don't want to get stuck with just ASP.
So I am trying to write new things in ASP.NET and I need some sort of way to
gradually migrate old pages to it without taking the whole thing offline


Thank you

David
 
S

Scott M.

ASP and ASP.NET do NOT share the same Session object and therefore they do
NOT share session data. You need to store your data in a place that they
both can access. Database is probably the best choice. Cookies,
querystrings, passing hidden form data all work too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top