We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • System.Threading.ThreadAbortException when executing remote web service

    Jun 12, 2007 04:59 PM|jim.klo|LINK

    I'm in the process of moving a set of web services that currently work under IIS 6 on Windows 2003 Server, to run on Windows Vista Ultimate, IIS 7.

     Everything seems to be working, with the exception of  each I try to execute a synchronous remote web service that has a long execution time  running on IIS 7 / Vista Ultimate, after about 2 - 3 minutes, a System.Threading.ThreadAbortException is thrown at the provider end of the web service, which can't be caught.  It appears to be a timeout issue, however I've set all the timeouts, that I could find to 1 hour, and even then the new timeout settings are either not being honored or I'm missing a setting which may be new to IIS 7.

     Can anyone possibly provide some insight into what my issue might be, and how to resolve it?

    Here's the stacktraces:


    [ThreadAbortException: Thread was being aborted.]
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +495
       System.Web.ApplicationStepManager.ResumeSteps(Exception error) +531
       System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +140
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +403

    Version Information: Microsoft .NET Framework Version:2.0.50727.312; ASP.NET Version:2.0.50727.312
    --.
    Source: System.Web.Services
    Exception Type: System.InvalidOperationException
    StrackTrace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at ServiceProxies.Net.NAntServiceSoap.ExecuteNAntTemporaryTask(String nantScriptFileContents, DirectoryFSO workingDirectory, String arguments) in C:\work\dotNET\Utilities\WADeploy\trunk\ServiceProxies\Net\NAntServiceSoap.cs:line 152
    at WADeployTool.Support.TargetDeployer.PerformNAntTask(NAntServiceSoap nantProxy, NAntTaskStaticCopy currentTask, ThreadDeploymentArgs args) in C:\work\dotNET\Utilities\WADeploy\trunk\WADeployTool\Support\TargetDeployer.cs:line 746

     

    Here are the errors in the event viewer:

    - System

    <div>
    - Provider
    <div>
    [ Name] ASP.NET 2.0.50727.0
    </div>
    - EventID 1309
    <div>
    [ Qualifiers] 32768
    </div>
    Level 3
    Task 3
    Keywords 0x80000000000000
    - TimeCreated
    <div>
    [ SystemTime] 2007-06-12T20:26:49.000Z
    </div>
    EventRecordID 6160
    Channel Application
    Computer XXXXXX
    Security
    </div>

    - EventData

    <div>
    3005
    An unhandled exception has occurred.
    6/12/2007 1:26:49 PM
    6/12/2007 8:26:49 PM
    a2f473a8da5c42d8947e6870c6071fdc
    23
    1
    0
    /LM/W3SVC/3/ROOT-1-128261534809598000
    Full
    /
    C:\DeployService\
    XXXXXX
    5784
    w3wp.exe
    NT AUTHORITY\NETWORK SERVICE
    ThreadAbortException
    Thread was being aborted.
    http://localhost:3450/NAntService.asmx
    /NAntService.asmx
    ::1
    XXXXXXX
    True
    Negotiate
    NT AUTHORITY\NETWORK SERVICE
    5
    NT AUTHORITY\NETWORK SERVICE
    False
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
    </div>

    AND

     

    -

    System

    <div>
    - Provider
    <div>
    [ Name] ASP.NET 2.0.50727.0
    </div>
    </div> <div>
    - EventID 1073
    <div>
    [ Qualifiers] 32768
    </div>
    </div> <div>
    Level 3
    </div> <div>
    Task 0
    </div> <div>
    Keywords 0x80000000000000
    </div> <div>
    - TimeCreated
    <div>
    [ SystemTime] 2007-06-12T20:26:49.000Z
    </div>
    </div> <div>
    EventRecordID 6161
    </div> <div>
    Channel Application
    </div> <div>
    Computer XXXXXX
    </div> <div>
    Security
    </div>

    - EventData

    <div>
    Failed to process request. Exception: System.AppDomainUnloadedException Message: Attempted to access an unloaded AppDomain. StackTrace: at System.Web.Hosting.ApplicationManager.RespondToPingIfNeeded() at System.Web.Hosting.HostingEnvironment.RespondToPingButNotTooOften() at System.Web.Hosting.HostingEnvironment.DecrementBusyCountInternal() at System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    </div>