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
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>
I’m glad to hear that things are working out on your machine.
Thank you very much for your feedback!