ASP.NET processing abruptly stopped on IIS 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • schaermu
    New Member
    • Nov 2009
    • 2

    ASP.NET processing abruptly stopped on IIS 6.0

    Hi there

    we noticed a rather strange behavior in one of our web applications. When debugging it on a local developer workstation, everything is processed fine (using Cassini Developement Webserver). When published on a remote webserver using IIS 6.0, processing runs fine for about 4 or 5 minutes, then abruptly dies.

    I'll explain later what "abruptly dies" means, first i would like to give an excerpt of the failing code.

    Code:
    // loads data from SAP Webservice and serializes it into database    
    LoadXMLDataFromSAP();
    
    // loop each item of a certain structure and parse data
    foreach (var xItem in xSapData)
    {// method determining a status, about 30 LOC, fast execution
        GetStatusCodeForContract(xItem);
    
        ...
    
        // methods to parse data blocks, about 400 LOC, slow execution (database etc.)
        TimeconsumingParserMethod1(xItem);
        TimeconsumingParserMethod2(xItem);
    }
    This code is running fine when Debugging, execution takes about 13 minutes (thats ok, because it only occurs when synchronizing all data with SAP). When running the SAME code against the SAME SAP-datasource on IIS 6.0, execution stops after 4 or 5 minutes.

    First, the program throws a System.NullRefe renceException on the call "TimeconsumingP arserMethod1()" , in the next loop we get the System.NullRefe renceException on "GetStatusCodeF orContract()". As we use the same parameter on both calls, i think the NullReferenceEx ception is thrown because the member "xItem" is null.

    Server configuration:
    8 Core Intel machine
    4 GB of RAM
    RequestTimeout = 900 (15 minutes)
    Memory usage = unlimited

    Does anybody know about such a behavior on IIS 6 or similar production server environments?
    Last edited by Frinavale; Nov 30 '09, 04:10 PM. Reason: Please post code in [code] ... [/code] tags. Changed quote tags into code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I have a feeling that this has something to do with permission settings on the main server. This is usually the case because Cassini runs under the user account that you've logged in with (which may be an administrative account with full permissions) but on a real server it runs under the ASP.NET User account (which is restricted).

    On the server, does the ASP.NET user account have permission to read the XML that you are working with?

    -Frinny

    Comment

    • schaermu
      New Member
      • Nov 2009
      • 2

      #3
      Hi Frinny

      Thanks for your answer, but i found the solution right now :) It has something to do with the AppDomain recycling behavior of ASP.NET 2.0, the AppDomain is reloaded on a certain amount of filechanges.

      For those interested, the following article helped me out a great deal :)

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I didn't realize that the AppDomain was recycled after a certain amount of file changes!

        That seems a bit absurd. I have heard of it recycling if your application uses too much memory and your worker process becomes too large though.

        Thanks for your response. I would never have known about this behaviour.

        -Frinny

        Comment

        Working...