1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Rep Power

    WCF Service or an aspx page on IIS 7.5 only works when w3wp.exe is elevated

    I'm encountering a problem where upon I am loading up a WCF service into IIS. Contained within this service is a reference to a DLL that wraps around a native static Lib file. This lib launches an exe and allows api access into the exe. When I run the service using Visual Studio's debugger, everything runs properly. However, when I load it up onto IIS and make a call to the service, it crashes claiming heap corruption. I have tried using asp.net impersonation, changing the identity of the w3wp.exe worker to a user that has executable right to the exe. I even went so far as to use an administrator account as the impersonation and identity, still no joy. When the exception occurs, it tells me that the user doesn't have adequate permission to execute the JIT and will need to be elevated to an Administrator.

    Now, this is where it gets peculiar. After being elevated, the service may then execute as expected as long as the w3wp.exe continues to run. If the w3wp.exe is stopped and restarted then it will throw the exception again. I've done a stack trace of the issue and have given IIS permission to access the files that the service is dependent upon as well as the DLL's dependencies. I have verified that the values in the DLL are being properly handled and that it doesn't corrupt before making a call into the Lib file.
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Rep Power
    I have no clue so I'll bump this post for you
    Doug G
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo