Windows Service Unexpectedly Terminates after porting from .NET 1.1 to .NET 2.0 RRS feed

  • Question

  • I have a Windows Service that uses asynchronous socket  to send data to subsystem , it was originally written in .NET 1.1.  When I upgraded to .NET 2.0 it kept terminating unexpectedly and I tracked this down to the breaking changes introduced in .NET 2.0 regarding unhandled exceptions on threadpool threads.  I now have improved exception handling on threadpool threads and an event handler on AppDomain.CurrentDomain.UnhandledException just to log anything that does get through but my service still unexpectedly terminates sometimes without calling this event handler.  The only thing in the event log is an entry by the .NET Runtime 2.0 Error Reporting which I've included below.

    I'm guessing from this info that it's a socket error of some kind but I don't understand why and unhandled exception like this wouldn't cause my event handler to be fired, allowing me to log it.

    Can someone help me to resolve the issue ?  Thanks in advance.

    Description from Eventslog of windows:
    Ereignistyp:    Fehler
    Ereignisquelle:    .NET Runtime 2.0 Error Reporting
    Ereigniskategorie:    Keine
    Ereigniskennung:    5000
    Datum:        03.06.2008
    Zeit:        08:22:21
    Benutzer:        Nicht zutreffend
    Computer:    INTEGRATION
    EventType clr20r3, P1 is.outengine.exe, P2 805.14.0.0, P3 47da3d86, P4 is.foundation, P5 1.0.2995.25960, P6 47da3d78, P7 16a, P8 156, P9 system.net.sockets.socket, P10 NIL.

    This error occurs only at customer end and not at development enviroment


    Tuesday, July 15, 2008 5:55 AM

All replies

  • Could this be a security issue on the client computer where the service is running under an account that does not have appropriate rights?
    William Wegerson (www.OmegaCoder.Com)
    Tuesday, August 5, 2008 12:36 AM