"SessionState..." error after update to Contour 1.1 from 1.0.9
Hello everybody,
I had a error after upgrading from Contour 1.0.9 to 1.1. The form itself works fine, but when I try to save it, I get the following error:
Server Error in '/' Application.
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.
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:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
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() +2647384 System.Web.UI.UserControl.get_Session() +17 Umbraco.Forms.UI.Usercontrols.RenderForm.RenderUi() in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.UI\Usercontrols\RenderForm.ascx.cs:375 Umbraco.Forms.UI.Usercontrols.RenderForm.nextPage(Object sender, EventArgs e) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.UI\Usercontrols\RenderForm.ascx.cs:205 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016
I actually tried to insert the SessionStateModule in Config.web as well, but when I do this instead I get a error 500. Is there an SQL/DB update as well for the Contour Upgrade?
<!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <!-- Asp.net 3.5 Modules--> <remove name="ScriptModule" /> <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
I've tested with removing the session module and adding it again for the IIS7 part of the configuration as well as adding enableSessionState=true to the pages node. Under system.webserver/modules the following lines solved the problemremovename="Session" />
Umbraco 4.0.4.2 with Contour in trial mode. Cleared out all of the browser cache + cookies. Did IISReset and SQL server reset. The data IS In fact saved in Contour, though because I'm running in trial mode, I can't see which data exactly is saved.
When I make a textfield mandatory, I get another error (one that was supposed to be fixed almost a year ago):
Server Error in '/' Application.
Unable to find control id '6aa29d17_e1ca_466f_88e1_289003b3e27e' referenced by the 'ControlToValidate' property of 'mandatory'.
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: Unable to find control id '6aa29d17_e1ca_466f_88e1_289003b3e27e' referenced by the 'ControlToValidate' property of 'mandatory'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Unable to find control id '6aa29d17_e1ca_466f_88e1_289003b3e27e' referenced by the 'ControlToValidate' property of 'mandatory'.]
System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(String name, String propertyName) +11098929
System.Web.UI.WebControls.BaseValidator.ControlPropertiesValid() +50
System.Web.UI.WebControls.BaseValidator.get_PropertiesValid() +44
System.Web.UI.WebControls.BaseValidator.Validate() +78
System.Web.UI.Page.Validate(String validationGroup) +11106428
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +105
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
"SessionState..." error after update to Contour 1.1 from 1.0.9
Hello everybody,
I had a error after upgrading from Contour 1.0.9 to 1.1. The form itself works fine, but when I try to save it, I get the following error:
Server Error in '/' Application.
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.
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016
I'm running on Umbraco 4.0.3.
Kind regards,
Niels Kristiansen
I actually tried to insert the SessionStateModule in Config.web as well, but when I do this instead I get a error 500. Is there an SQL/DB update as well for the Contour Upgrade?
There is no one who had the same problem?
Comment author was deleted
Hi Niels,
I think this error is very specific to your current setup.
Do you have the sessionState element in your web.config?
Yep, I have these two informations in my web.config:
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
and
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
Has there been some new settings regarding sessions, that wasn't a part of the version 1.0.9?
Comment author was deleted
Hi Niels,
Yes we store something in the session on the renderform usercontrol in the 1.1 update that wasn't there before.
Can you share some more details on your setup?
Of course :)
What is needed?
The testsite is placed here:
http:// fhbrand . nikri . dk (sorry for the copy/paste part, but I don't want Google to index this one yet)
The problem is on the following page after saving:
http:// fhbrand . nikri . dk / kursusafdeling/kursusoversigt/foerstehjaelp/foerstehjaelpkursus-begynder/2010-09-15
Here is the full web.config:
I returned to 1.0.12, I could find a solution to get this 1.1 version working unfortunately. There was some cool updates here...
Niels,
I've tested with removing the session module and adding it again for the IIS7 part of the configuration as well as adding enableSessionState=true to the pages node.
Under system.webserver/modules the following lines solved the problem remove name="Session" />
Hth,
Harald
I did get the same Exception.
Haralds tip works for me on IIS7
Same here, should be handled by Contour's installer. Probably best to add it to both system.webserver/modules and system.web/httpmodules.
Hmm, so I've done all this, added:
Added in system.webserver/modules and system.web/httpModules:
Sessionstate node looks like this:
Umbraco 4.0.4.2 with Contour in trial mode. Cleared out all of the browser cache + cookies. Did IISReset and SQL server reset.
The data IS In fact saved in Contour, though because I'm running in trial mode, I can't see which data exactly is saved.
When I make a textfield mandatory, I get another error (one that was supposed to be fixed almost a year ago):
Server Error in '/' Application.
Unable to find control id '6aa29d17_e1ca_466f_88e1_289003b3e27e' referenced by the 'ControlToValidate' property of 'mandatory'.
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: Unable to find control id '6aa29d17_e1ca_466f_88e1_289003b3e27e' referenced by the 'ControlToValidate' property of 'mandatory'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
Comment author was deleted
@Sebastiaan, what version of Contour are you running?
I upgraded to the latest nightly (oct 22) just to be sure.
Comment author was deleted
@Sebastiaan, any chance you can mail me a backup of the site , since I can't reproduce the error.
Alright, thanks to a little help from Tim, here's my solution:
Do NOT spell "Session" in lowercase.
Bad:
GOOD:
is working on a reply...