PC Review


Reply
Thread Tools Rate Thread

How to allow longer time before timeout error?

 
 
Andrew
Guest
Posts: n/a
 
      21st Jan 2008
Hello, friends,

Our have a .net 2003 website using c#.net.

We want to let our users to have longer timeout time, and we did in
Web.config:

<authentication mode="Forms">
<forms loginUrl="login.aspx" protection="All" name="Cookie"
slidingExpiration="true" timeout="120" />
</authentication>

hopefully this would allow 2 hours before timeout.

However, it turned out users did not get that long timeout, rather they
still got timeout error like before.

Any reasons and how to fix it? Thanks.
 
Reply With Quote
 
 
 
 
Leon Mayne
Guest
Posts: n/a
 
      21st Jan 2008
"Andrew" <(E-Mail Removed)> wrote in message
news:86328FE3-520C-4ED8-A610-(E-Mail Removed)...
> Hello, friends,
>
> Our have a .net 2003 website using c#.net.
>
> We want to let our users to have longer timeout time, and we did in
> Web.config:
>
> <authentication mode="Forms">
> <forms loginUrl="login.aspx" protection="All" name="Cookie"
> slidingExpiration="true" timeout="120" />
> </authentication>
>
> hopefully this would allow 2 hours before timeout.
>
> However, it turned out users did not get that long timeout, rather they
> still got timeout error like before.
>
> Any reasons and how to fix it? Thanks.


The session may be timing out before the authentication token. Set the
session timeout as well:
<sessionState timeout="120" />
(Check that properly, as you may have to specify other settings)

 
Reply With Quote
 
Leon Mayne
Guest
Posts: n/a
 
      21st Jan 2008
"Leon Mayne" <(E-Mail Removed)> wrote in message
news:FF7AB0FB-AF77-41AD-A63A-(E-Mail Removed)...
> "Andrew" <(E-Mail Removed)> wrote in message
> news:86328FE3-520C-4ED8-A610-(E-Mail Removed)...
>> Hello, friends,
>>
>> Our have a .net 2003 website using c#.net.
>>
>> We want to let our users to have longer timeout time, and we did in
>> Web.config:
>>
>> <authentication mode="Forms">
>> <forms loginUrl="login.aspx" protection="All" name="Cookie"
>> slidingExpiration="true" timeout="120" />
>> </authentication>
>>
>> hopefully this would allow 2 hours before timeout.
>>
>> However, it turned out users did not get that long timeout, rather they
>> still got timeout error like before.
>>
>> Any reasons and how to fix it? Thanks.

>
> The session may be timing out before the authentication token. Set the
> session timeout as well:
> <sessionState timeout="120" />
> (Check that properly, as you may have to specify other settings)


P.S. You'll probably still get problems, as the session will often timeout
even though the authentication token is still valid. To fix this you need to
add some code in the Session_Start function in your Global.asax which will
check if the user is authenticated when a new session is starting, and if so
create all the user's session details again, e.g.

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Check to see if the user is already authenticated
If User.Identity.IsAuthenticated = True Then
' The session has expired before the forms authentication did
' Create session variables again for the user
Session("CurrentUser") = New
Person(CInt(Request.Cookies("UserId").Value))
End If
End Sub

If you do this then you don't have to modify your session timeout.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection timeout set to 5 sec but takes longer to timeout Avi Microsoft C# .NET 4 10th Mar 2010 04:06 PM
Server requests timeout every time in Outlook 2003. Error 4202. =?Utf-8?B?SElTRUFTMQ==?= Microsoft Outlook Discussion 4 22nd Oct 2007 06:12 AM
error 286: the other application in the DDE conversation isn't responding in the time specified by the OLE/DDE timeout setting CLarkou@gmail.com Microsoft Excel Discussion 0 22nd Dec 2005 07:32 AM
Timeout at runtime but no timeout at design time in VS2003 Patrice Raucq Microsoft ADO .NET 8 9th Mar 2005 07:16 AM
Longer no answer timeout Eddie Windows XP General 0 24th Jan 2004 06:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:06 AM.