Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 13th, 2007, 06:54 AM
Registered User
Join Date: Aug 2007
Location: , , Norway.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Remoting timing out after 2 minutes


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:
catch (ThreadAbortException)
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?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 01:29 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.