InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


EnableSessionState = True Expand / Collapse
Author
Message
Posted 07/03/2005 10:38:48


Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 01/04/2005 07:33:00
Posts: 26, Visits: 1

This was pretty time consuming...

 

The server that I just installed InstantForum on required me to go through all the aspx pages and add EnableSessionState="true" to the page directive.  If I didn't add EnablesSessionState="true" to the page directive I got the following error on page load:

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive

 

 

 




A. Mulroy

Post #4710
Posted 31/03/2005 15:56:25


Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 01/04/2005 07:33:00
Posts: 26, Visits: 1

Solution:

In the web.config

<system.web>   
 
 <!--
 Clear out the WSS ASP.NET handler and specify the default ASP.NET handler for all pages.
 --> 
 <httpHandlers>
 <clear />
 <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
 </httpHandlers>
 
 <!--
 Set the trust to Full. WSS configures a very restrictive trust policy that does not
 allow ASP.NET Web application to run correctly.
 --> 
 <trust level="Full" originUrl="" />
 
 <!--
 Enable the session module. This can also be enabled on the WSS Web.config,
 but is not enabled by default. If you receive the following message:
 Parser Error Message: The module 'Session' is already in the application
 and cannot be added again. You can remove the following
 <httpModules></httpModules> section as session is already enabled
 on the virtual server.
 --> 
 <httpModules>
 <!--<add name="Session" type="System.Web.SessionState.SessionStateModule"/>--> This is commented out because its already in the machine.config file
 </httpModules>
 
 <!-- Enable session state for all the pages in the Web application. -->
 <pages autoEventWireup="true" enableSessionState="true" enableViewState="true" enableViewStateMac="true" smartNavigation="true" validateRequest="false" />
        
 <!-- Comment the line below if your running .NET framework 1.0 to disable request validation -->
 <!--<pages validateRequest="false" />-->
  
 <!-- Enable in-process session state for application -->
 <sessionState mode="InProc" cookieless="false" timeout="20"/>
  
 <!-- Set debugmode to false when running application in live environment -->
 <compilation debug="true"/>
    
 <!-- enable custom error page if not viewing locally -->
 <customErrors mode="RemoteOnly" defaultRedirect="error.aspx"/>
  
 <!-- When uploading a file to the web server, we have a limit of 4MB by default with asp.net. -->
 <!-- The value is set in the key, maxRequestLength below in kilobytes. -->
 <!-- Increase this value to allow larger file uploads -->
 <!-- This value should be increased to allow larger uploads when adding attachments to posts. -->
 <!-- The default setting for this key is 30MB. -->  
 <httpRuntime maxRequestLength="30096"/>
  
 </system.web>




A. Mulroy

Post #5265
Posted 31/03/2005 15:57:08


Support Supremo

Support SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport Supremo

Group: Customers
Last Login: 19/08/2008 19:01:11
Posts: 568, Visits: 2,503

I’m glad to hear that things are working out on your machine. 

Thank you very much for your feedback!

 

Post #5283
« Prev Topic | Next Topic »

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 2:42am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 10 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.