# Why are my web forms getting a Time Out Expired error when I submit the form

**URL:** <https://discuss.workflowgen.com/t/why-are-my-web-forms-getting-a-time-out-expired-error-when-i-submit-the-form/167>\
**Category:** Visual Studio Web Forms\
**Created:** [April 7, 2008, 7:32am UTC](https://discuss.workflowgen.com/t/why-are-my-web-forms-getting-a-time-out-expired-error-when-i-submit-the-form/167 "2008-04-07T07:32:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [April 7, 2008, 7:32am UTC](https://discuss.workflowgen.com/t/why-are-my-web-forms-getting-a-time-out-expired-error-when-i-submit-the-form/167/1 "2008-04-07T07:32:08Z")

</div>

Web forms are session-based, and these sessions are automatically recycled by IIS every 20 minutes by default. To prevent losing your data, you should add the following code to your web forms code-behind’s page constructor method:

#### C#

```auto
Examplepublic partial class _Default : WorkflowPage { public _Default() : base() { IsSimpleMode = true; IsSessionLess = true; }}

```

#### VB.NET

```auto
ExamplePublic Class _Default Inherits WorkflowPage Public Sub New() MyBase.New IsSimpleMode = true IsSessionLess = true End SubEnd Class

```
