tags:

views:

861

answers:

1

I have a large 1 page ASP.Net application. Much of this application has been entirely rewritten using .Net 3.5 from a previous version that was using .Net 2.0. As a result, the designers of this revision decided to put the entire page inside of an update panel (sigh). It seems that the only good part about this update panel is that it allows a redirection to be made to a timeout page upon session timeout (~30 minutes).

My team has implemented a new section on this page in a tab that is using ASP.Net AJAX to access an asmx web service (this will be moved to a WCF ScriptService soon). All of the calls here are being done with custom JavaScript calling the ASP.Net AJAX JavaScript proxies.

My problem is that these web service calls are still being made after the rest of the page would have timed out had a partial postback occurred.

What I'm looking for is for some way for my new feature to timeout at the same time as the rest of the application.

+1  A: 

If the web application should control the session, it will have to provide a way to query for it. This can be achieved by some king of pinging mechanism like IsTheSessionStillUp that will respond yes or no. A simple aspx page can do that. Then all external services will need to query the state and in case the main web application session has timed out enforce the service to timeout also. This can be implemented in the service proxy as a ping call before the service call is made.

Aleris