navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

SessionState is not working

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> SessionState is not working
Page: [1]
 
kafka

 

Posts: 12
Joined: 5/9/2006
Status: offline

 
SessionState is not working - 6/13/2006 10:31:21   
I am getting this (typical) error message:
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

Now I have set enableSessionState to true and included a System.Web.SessionStateModule in web.config. I have also verified through my IIS manager that session state in enabled and it is set to "InProc" etc etc. so the web.config is certainly working.

I am building and testing my application on LocalHost if that makes any difference and it seems to me that when I look at some "code behind" that i didn't write there are Session Variables being used. Now the session variables being used there are in C# while the coding i am doing is in VB if that is a clue. But i am not accessing those same variables.
I have been all over the web on this one for two days and is is frustrating me to no end. I appreciate any help.

-Lon

MORE INFO:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

Source Error:

Line 21: Dim site_staffDS as DataSet = New DataSet
Line 22: Dim handlenull as string = "empty"
Line 23: Dim site_key_keep = Session("site_key")
Line 24:
Line 25:


Source File: C:\Inetpub\wwwroot\satellites\site_staff.aspx Line: 23

Stack Trace:

[HttpException (0x80004005): Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.]
System.Web.UI.Page.get_Session() +2025437
ASP.site_staff_aspx..ctor() in C:\Inetpub\wwwroot\satellites\site_staff.aspx:23
__ASP.FastObjectFactory_app_web_qxe_jl5s.Create_ASP_site_staff_aspx() +38
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +49
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +115
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


< Message edited by kafka -- 6/13/2006 10:51:06 >
rdouglass

 

Posts: 9206
From: Biddeford, ME USA
Status: offline

 
RE: SessionState is not working - 6/13/2006 10:58:09   
quote:

C:\Inetpub\wwwroot\satellites\


Just a quick guess but is that directory configured for an application in IIS and does it have a proper base directory?

Attachment (1)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to kafka)
kafka

 

Posts: 12
Joined: 5/9/2006
Status: offline

 
RE: SessionState is not working - 6/13/2006 11:10:39   
hi rDouglass! Yes it is configured for an application in IIS and i thought that was gonna solve it! However not sure about the proper base directory. I'll check and see if I know what i'm looking for :/. Thanks for the screenshot!

what should i be looking for?


-Lon

(in reply to rdouglass)
rdouglass

 

Posts: 9206
From: Biddeford, ME USA
Status: offline

 
RE: SessionState is not working - 6/13/2006 12:01:34   
Sorry. By base directory, I mean does it have an asp_client directory in the root web? If it does have one and you haven't made any changes to it, it is probably configured properly.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to kafka)
kafka

 

Posts: 12
Joined: 5/9/2006
Status: offline

 
RE: SessionState is not working - 6/13/2006 14:28:49   
hmm not sure about that. I see an ASPNet_Client folder OUTSIDE the Virtual Website folder. But that is all.

Besides I just moved the whole website to the Default Website Location and I'm about to throw this computer through the 31st floor window!

So if I did move it to the Default Website location. What does that change?

thanks! I'm STUMPED
-Lon

(in reply to rdouglass)
rdouglass

 

Posts: 9206
From: Biddeford, ME USA
Status: offline

 
RE: SessionState is not working - 6/13/2006 14:51:40   
Do you have Sharepoint Services running?

http://support.microsoft.com/default.aspx?scid=kb;en-us;837376

If not, can you confirm that you have session state enabled in the application Properties:Configuration:Options in the IIS Manager screen like the screen shot I posted?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to kafka)
kafka

 

Posts: 12
Joined: 5/9/2006
Status: offline

 
RE: SessionState is not working - 6/13/2006 15:10:33   
Yes i can confirm that SessionState is enabled from the IIS manager and I can confirm the storage is ÏnProc"and timeout is 20 mins.

Also since this is just my Local computer I shouldn't have Sharepoint Services Installed unless they bundled it with another install app like Visual Web Developer Express. I don't see it under add/remove.

I am aware of that conflict with WWS and had altered my web.config file J.I.C. but that didn't work either (unless I had a syntax error). yikes. I appreciate the help.

One other thing. I mentioned that some of the other 'code behind'', that was NOT created by me but created by FrontPage uses Session State. And in closer inspection it seems ALL PRIOR USE of SessionState is in the code behind which seems to working just fine! Is there anything that would keep .aspx level session variables from being used?


< Message edited by kafka -- 6/13/2006 16:08:48 >

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> SessionState is not working
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts