Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 13th, 2007, 06:54 AM
Registered User
 
Join Date: Aug 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Remoting timing out after 2 minutes

Hi!

I have an ASP.Net solution which uses remoting to allow for hotswappable plugins. Everything runs on the same computer - the MarshalByRefObject objects are simply loaded in a new AppDomain and when new plugin-dlls are available, the old AppDomain is unloaded, and the new plugins are loaded into a new AppDomain.

The problem is when the call to the plugin takes a long time - more than two minutes to be precise. Then the thread in which the plugin runs is aborted: I get a ThreadAbortException with the text "Thread was being aborted".

The stack trace doesn't seem relevant, as this happens at random places in the code, depending upon where the program is when the thread is aborted.

I've tried extending the lease for the object and the IIS timeout (in web.config) with no improvement. I've tried catching the ThreadAbortException and using ResetAbort() like so:
Code:
try
{
   SomeCall();
   SomeOtherCall();
}
catch (ThreadAbortException)
{
   Thread.ResetAbort();
   SomeCall();
   SomeOtherCall();
}
YetAnotherCall();
If the thread is aborted in the first SomeCall(), then the abort is reset and SomeCall() and SomeOtherCall() is called as expected in the catch clause. But when it then comes to YetAnotherCall(), a new ThreadAbortException is thrown.

Another thing - the Thread doesn't throw the Exception at exactly 2 minutes after the method was called - if the two minute mark happens in the middle of a time consuming call, it does finish and then the thread is exception comes when the next line is executed. But when it is thrown, I can see from the logs that the two minute mark always happens during the last call to return OK.

Does anyone know what is going on here?





Similar Threads
Thread Thread Starter Forum Replies Last Post
convert time to minutes stolte XSLT 3 November 21st, 2008 04:12 AM
how to set the maximum minutes in setTimeout() or kasipandian Javascript 2 February 18th, 2008 12:37 PM
Calculate time (minutes) between two times rtr1900 Classic ASP Basics 18 January 2nd, 2008 03:06 PM
Remoting aborts thread after 2 minutes BrainWave C# 1 August 14th, 2007 12:15 PM
Calculating hours and minutes between to dates timmaher Access VBA 4 May 10th, 2005 07:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.