Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need session variable to transfer over to another server (diff. URL)

Status
Not open for further replies.

kev510

Programmer
Jul 12, 2006
61
Hi guys,
I've run into some trouble with my ASP page.
First of all, using cookies is not a solution.
I have page A, B and C.
Page A is a login screen, and when the user logs in correctly, it sets a the Session("AccessCode") = "XYZ".

In page B, there is a link that directs to page C, but here's the tricky part.

Page B and C have two different URL, such as --
Page B = "Page C = "
I am guessing the problem is that the Session("AccessCode") is reset while going from B to C, which prompts the user the user to login once again.

Is there a way to keep the session alive while going from one URL to another? Please let me know. Thank you for your time!

-Kevin
 
The session should still be alive.

Here where I work, we have about 50 different URLs that check for login status by checking for existence of a Session variable.

Do some Response.Writes and see if in fact you are losing the session.

If you happen to be, see what the timeout is set for.

[monkey][snake] <.
 
monksnake is right in that your session variable should not change or be lost (unless you have some unusual settings in IIS). Is your session variable lost only on a specific page or between two pages? If so, it may be worthwhile to review the code on the affected page(s) to see if maybe you are re-setting it somewhere.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 

First of all, using cookies is not a solution.
Just in case you didn't realise - ASP sessions use cookies to store the ASP session id which relates the client back to the server session object and associated variables.

A smile is worth a thousand kind words. So smile, it's easy! :)
 
When I read the original post, my understanding of the problem is that there are two distinct IIS applications... and that one application needs to read a session variable set the the other application.
 
Two things make me not think that Sheco.

One is the same URL base, DBS80002.

The other thing is the call of the same login page from either location.

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top