we are experiencing big difficulties in the configuration of ASP.Net state service and II7. The service seems not working correctly because when the application pools recycles the applicatio loose the session.
If we try the same configuration in IIS6 it works correcly.
What is the correct way to configure the aspnet session state service in iis7?
Thanks, regards.
Stefano.
ASP.net Sessionstarter kitsAS.net 2.0 sessionApplication Sessionsas.netp.net sessionstate
Kitesolution...
0 Points
4 Posts
State Service, application pool and IIS7
Jul 07, 2010 12:44 PM|LINK
Hi all,
we are experiencing big difficulties in the configuration of ASP.Net state service and II7. The service seems not working correctly because when the application pools recycles the applicatio loose the session.
If we try the same configuration in IIS6 it works correcly.
What is the correct way to configure the aspnet session state service in iis7?
Thanks, regards.
Stefano.
ASP.net Session starter kits AS.net 2.0 session Application Sessions as.netp.net sessionstate
talktoanil
Member
260 Points
102 Posts
Re: State Service, application pool and IIS7
Jul 07, 2010 01:05 PM|LINK
take a look at this
http://blogs.msdn.com/b/david.wang/archive/2006/01/26/thoughts-on-application-pool-recycling-and-application-availability.aspx
Kitesolution...
0 Points
4 Posts
Re: State Service, application pool and IIS7
Jul 07, 2010 01:54 PM|LINK
Tanks a lot for your help talktoanil, finally I found a solutions for this problema.
I don't know why but if you want to use the state server correctly in IIS7 you must specify a Key in the machine key section of the web config.
Bilawal121
Member
16 Points
10 Posts
Re: State Service, application pool and IIS7
Mar 13, 2012 07:53 AM|LINK
<sessionState mode="StateServer" stateNetworkTimeout="10" stateConnectionString="tcpip=loopback:42424" ></sessionState>
<machineKey
validationKey="28648A4880842F28050732A312FF1CDC2F49F66A59422EC9AF062B3135D5064177BA70CF7A4227F497ED6CAFCC91B7970B1746C07867486F43C5D661ADE57B79"
decryptionKey="92C4163ADB1B5C6D93A0EE8D19C96544CD762DF2472A9DF547DF677AA509BF49"
validation="SHA1"
decryption="AES"/>
i added this in both web apps web.config of test1 and test2 web application but session is still not shared to test2 web application
in test1 web application i set session session["test"]="SharingSession";
in test2 web applicaton i get session string str=session["test"].toString();
hichamito
Member
2 Points
4 Posts
Re: State Service, application pool and IIS7
Sep 16, 2012 07:55 PM|LINK
Please can you tell us how to specify the machine key, Thanks