Forum Moderators: open

Message Too Old, No Replies

Session() variable, variable undefined?

I have had this error, a couple of times, w/OPTION EXPLICIT

         

macrost

2:09 pm on Dec 23, 2003 (gmt 0)

10+ Year Member



Hopefully someone has some insight to this problem. When I have to use session() variables, and have OPTION EXPLICIT declared, I sometimes get the error that Session is undefined.

When I take out the OPTION EXPLICIT declaration, then I get Session type mis-match. What the heck is going on here? Sessions are being used elsewhere on the site and on other sites on the same server.

Thanks!
Mac

webdevsf

2:29 pm on Dec 23, 2003 (gmt 0)

10+ Year Member



Make sure allow session state is checked in the IIS properties. If it is not, the session object won't be available.

If you still can't figure it out, start commenting out lines of code until you isolate the problem. :(

macrost

2:32 pm on Dec 23, 2003 (gmt 0)

10+ Year Member



webdev,
Thanks for the reply, where do I check for that in IIS? Sorry, it's my last day before vacation, and I'm spacing out a little right now. ;)

Mac

In the immortal words of Homer J. Simpson, D'Oh! Thanks webdev, found it and fixed it. We are running a virtual server here at work, is there any way besides going into the properties for each website, and clicking enable session state? ;) If not, I suppose I'll do it like that. Thanks again!

Mac

webdevsf

7:49 pm on Dec 23, 2003 (gmt 0)

10+ Year Member



[microsoft.com...]

you can set @ENABLESESSIONSTATE on the page if you want.