| | |
Losing session variable problem...help!
Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
I've implemented a security method where a user goes to a page, if they are are session authenticated, they redirect to a central login page, and then if they login correctly they are redirected back to the originating page with the session variable true. I'm basically using javascipt to accomplish this at the top of each file I want to protect:
The destination page is passed in the querystring, and that's how it knows where to go back to. Our servers are set up so that we have a production server, and then the test server is a virtual directory off the main web, so our paths look like intranet.domain.com, and our test environment is test.domain.com, but they are technically in the same "website" under IIS.
My process works in the test environment, but doesn't in the production environment. It is the same code, so I don't know what else could be causing it to have problems. The redirects are working, and the login is passing, its just not getting the session variable in the prod setting - it just goes in an endless loop. What else can I look for that might be different between the two domains? Thanks!
ASP Syntax (Toggle Plain Text)
if(Session("Authenticated") != "-1") { var curLoc = "http://" + Request.ServerVariables("SERVER_NAME") + Request.ServerVariables("URL"); Response.Redirect("http://" + Request.ServerVariables("SERVER_NAME") + "/security/login.asp?destPage=" + curLoc); }
The destination page is passed in the querystring, and that's how it knows where to go back to. Our servers are set up so that we have a production server, and then the test server is a virtual directory off the main web, so our paths look like intranet.domain.com, and our test environment is test.domain.com, but they are technically in the same "website" under IIS.
My process works in the test environment, but doesn't in the production environment. It is the same code, so I don't know what else could be causing it to have problems. The redirects are working, and the login is passing, its just not getting the session variable in the prod setting - it just goes in an endless loop. What else can I look for that might be different between the two domains? Thanks!
•
•
Join Date: Jul 2005
Posts: 483
Reputation:
Solved Threads: 19
shouldn't that be
ASP Syntax (Toggle Plain Text)
if(Session("Authenticated") != "-1") { var curLoc = "http://" + Request.ServerVariables("SERVER_NAME") +"/"+ Request.ServerVariables("URL"); Response.Redirect("http://" + Request.ServerVariables("SERVER_NAME") + "/security/login.asp?destPage=" + curLoc); }
•
•
•
•
Originally Posted by campkev
shouldn't that be
ASP Syntax (Toggle Plain Text)
if(Session("Authenticated") != "-1") { var curLoc = "http://" + Request.ServerVariables("SERVER_NAME") +"/"+ Request.ServerVariables("URL"); Response.Redirect("http://" + Request.ServerVariables("SERVER_NAME") + "/security/login.asp?destPage=" + curLoc); }
![]() |
Similar Threads
- ASP.NET - session objects Problem (ASP.NET)
- Session Variable clashing (ASP.NET)
- session variable undefined in MX 6.1, works in CF 5 (ColdFusion)
- Session variable (ASP.NET)
- session variable:again (ASP.NET)
Other Threads in the ASP Forum
- Previous Thread: register error
- Next Thread: How to specify a port number
| Thread Tools | Search this Thread |
archive asp aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection





