Are you referring to client-side timeouts resulting from the web-service not 
responding "quickly enough" (however that's defined); to server-side session timeouts 
that occur when a particular client's session has timed out because there's been no 
recent activity; to some kind of timeout you're imposing on the users of the GUI so 
that they get logged out if they don't do anything for a while; or some combination of 
them?  It wasn't very clear.

It actually sounds like you've got more than one of those involved.

You say "Session_End doesn't get called" but don't say that you connected your 
Session_End method up to something via a delegate; did you?  (You are talking about 
the server side here, aren't you?)  The SessionStateModule.End event is documented to 
work only if SessionStateMode is InProc; does that apply to you?

If your second set of problems is happening as result of a GUI-session inactivity 
timeout, you can set a flag when you call a WebService indicating that that a call is 
in progress, and clear the flag when you get the result.  (If you can have multiple 
outstanding requests simultaneously, by using asynch calls, increment and decrement a 
counter instead of using a boolean flag.)  Have the logic in the GUI-session-timeout 
handler check the flag/counter and re-set the inactivity timeout (perhaps to a shorter 
time than normal) if something is in process.

(Why didn't you cut the original message from your rewritten version?)

At 05:30 AM 9/23/2004, Ranjan wrote
>< sorry for the unformatted mail I will rewrite now in outlook>
>
><rewritten>
>Hi,
>
>We have developed a 3 tier application. It uses web-services for the UI
>-- Business Logic connection. One of the major miscalculations that we
>did was not considering Session Timeouts. Now after patching up every
>other web-method with
>
>[WebMethod(EnableSession=true)]
>
>I get 2 problems, one of them is,again, patchable. The other, serious.
>
>Problem 1. Session_End doesn't get called when sessions time out.
>
>WorkAround : Monitor Session on start.
>
>As of now this works fine.
>
>Problem 2 (the serious one)
>
>If one of my windows forms call a webservice's method and
>coincidentally, while the call is made, the session times out.Here most
>of my windows forms objects get disposed, I programmatically close all
>MDI childs, and prompt for log in. After successful log in, the call
>that was made starts completion ( <painful>) . Obviously all objects are
>not getting disposed, or Gced. Is there anything really really basic
>that im missing out here? I mean why should the completion continue once
>I close all windows ? Should I call Dispose for each form
>programmatically? Its causing a major embarrassment because in some
>places I start getting weird errors like buttons not showing up, Object
>reference  errors(obviously) , and some new ones like Cannot create
>Window handle etc.
>
>Any comment would be very helpful.
>
>r.
>
></rewritten>


J. Merrill / Analytical Software Corp

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with CSharp
August 30 - September 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to