Session Timeout - how long is it alive
Re-invent ASP.NET Hosting Community
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Session Timeout - how long is it alive Expand / Collapse
Message
Posted 11/2/2009 5:28:07 PM Post #896
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
using ASP.NET 3.5, I have a form that users fill out and submit. If they take too long to fill it out, the web server presents an error page with "Validation of viewstate MAC failed".  How long does the re-invent web server keep sessions alive, and how can I extend it? 

I've tried these things that did not work:

   page.EnableViewStateMac = False on the page load event

  me.EnableViewState = False

Posted 11/2/2009 7:03:11 PM Post #897
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
The servers IIS app pools are set for 20 minute inactivity session timeout.  A pool may recycle if the it execceds the maximum about of dedicated memory to it which is set for 125MB or if the pool uses excessive CPU usage.  For example if the pool uses 90% of all available CPU power for over 1 minute.   You may want to check these criteria and possible hard code a validation into your web.config.

Example:

Configure ASP.NET to not use Auto-Generated Key but rather a predefined key. This is the preferred method.

To do this, follow these steps:

a) Either build your own Key Generator (http://support.microsoft.com/kb/313091/EN-US/) or use this tool (http://www.aspnetresources.com/tools/keycreator.aspx).

If using the online tool:

b) In the online tool, simply click on “Generate”.

c) Copy the content in the textbox into your site’s web.config file. The machineKey node should be within <system.web>

eg.

<?xml version="1.0"?>

<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<machineKey
validationKey="2EEA416CEFC6D6BE856ED57B97FB9BA7DFCCE17C073125949A1D682C80A44BB2A
D887DDDE13DBFB0954F1000FFE5757E99693F222F8E28CAC2E6DAB8C4F99E0C"
decryptionKey="877478B2F33A74226ABEF55FDCC1A76E43F1BBEA6241A592"
validation="SHA1" />
<compilation debug="false"/>
<authentication mode="Windows"/>
<pages enableViewStateMac="true"/>
</system.web>
</configuration>

For more information on ViewState troubleshooting, see http://support.microsoft.com/default.aspx?scid=kb;EN-US;829743


Paul B

Re-invent Technologies LLC
http://www.re-invent.com

Innovative ASP.NET 3.5/2.0 Hosting
Now with Windows 2008 Hosting and SQL 2008
Celebrating 10 Years in Business!

Posted 11/3/2009 4:50:00 PM Post #898
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Many thanks, Paul - that resolved the issue for me.
« 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: Administrator, Re-invent (Paul), Re-invent (Nick)

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 8:06am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.036. 9 queries. Compression Disabled.


Copyright 2008 Re-invent Technologies LLC. All Rights Reserved.