I would like to ask you this question because I am a bit stuck with it .
I’m wondering why when I connect thanks to my login form, and when I am on my default page, after 1h staying connected, it disconnects and goes back to the login page.
This is my actual webconfig .
<configuration>
<configSections>
</configSections>
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString='Data Source=.\SQLEXPRESS; AttachDbFilename = "C:\Users\Maxime\Documents\Visual Studio 2010\Projects\ClientPortal\ApplicationUI\Website\ClientPortal\App_Data\DataUi.mdf";Integrated Security=True;User Instance=True'
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<pages validateRequest="false" />
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="Logon.aspx" name=".ASPXFORMSAUTH">
</forms>
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
<sessionState cookieless="false"/>
<httpRuntime maxRequestLength="1048576"/>
</system.web>
<appSettings>
<add key="FolderPath" value="uploads" />
</appSettings>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
</configuration>
Should I put something else in the web config to disable this ?
It’s a bit annoying ..
You are using the ASP.Net forms authentication. The default timeout for which is 30min (half an hour) I am surprised it lets you idle for an hour.
use the following code to control the timeout period.