|
 |
asp_databases thread: accessing session variables when content type is different
Message #1 by "Kunal" <k_garach@y...> on Mon, 3 Mar 2003 16:08:59
|
|
hiya ppl,
im having a very weird problem trying to access my session variables....
i have the following two lines in my global file since im trying to return
the results of a recordset into an excel sheet
Response.Buffer = TRUE
Response.ContentType="application/vnd.ms-excel"
however, if i try the following anywhere in the code,
if Session ("loggedin") <> "yes" then
response.redirect ("default.asp")
the check simply fails, i dunno why.
if i comment out the response.contenttype line of code, it works
perfectly. however with that line, the session variable value just dosent
exist.
how can i get around this ?? any help will be appreciated ..
thanx
Message #2 by "Neil Jones" <neil@c...> on Mon, 3 Mar 2003 11:10:29 -0500
|
|
Have you put the code that does the login check at the very top of your
page, before the part that sends recordset to Excel?
Neil
-----Original Message-----
From: Kunal [mailto:k_garach@y...]
Sent: Monday, March 03, 2003 4:09 PM
To: ASP Databases
Subject: [asp_databases] accessing session variables when content type
is different
hiya ppl,
im having a very weird problem trying to access my session variables....
i have the following two lines in my global file since im trying to return
the results of a recordset into an excel sheet
Response.Buffer = TRUE
Response.ContentType="application/vnd.ms-excel"
however, if i try the following anywhere in the code,
if Session ("loggedin") <> "yes" then
response.redirect ("default.asp")
the check simply fails, i dunno why.
if i comment out the response.contenttype line of code, it works
perfectly. however with that line, the session variable value just dosent
exist.
how can i get around this ?? any help will be appreciated ..
thanx
Message #3 by "Kunal" <k_garach@y...> on Mon, 3 Mar 2003 16:55:37
|
|
yup, as i mentioned, i tried it out by placing the code manually in *all*
possible places.
however, as of now, ive found something that looks like a solution to this
problem. Seems that office 2000 does have a bug :) that resets (empties)
all session variables when mime types are streamed using IE.
more on this can be found at:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q264143
im currently downloading a service release :( which as usual is taking too
long......
hopefully, this will be the solution to the problem.
thanx for your help.
> Have you put the code that does the login check at the very top of your
page, before the part that sends recordset to Excel?
Neil
-----Original Message-----
From: Kunal [mailto:k_garach@y...]
Sent: Monday, March 03, 2003 4:09 PM
To: ASP Databases
Subject: [asp_databases] accessing session variables when content type
is different
hiya ppl,
im having a very weird problem trying to access my session variables....
i have the following two lines in my global file since im trying to return
the results of a recordset into an excel sheet
Response.Buffer = TRUE
Response.ContentType="application/vnd.ms-excel"
however, if i try the following anywhere in the code,
if Session ("loggedin") <> "yes" then
response.redirect ("default.asp")
the check simply fails, i dunno why.
if i comment out the response.contenttype line of code, it works
perfectly. however with that line, the session variable value just dosent
exist.
how can i get around this ?? any help will be appreciated ..
thanx
|
|
 |