We have a Windows service written in C#. it is crashing after running for sometime about 5-6 hours.
Our C# Windows service calls Un-Managed code which is a COM component.
The only error information I get from Event Viewer is:
Faulting application application.exe, version 2.2.2.0, stamp 45ed8d14,
faulting module comcomponent.dll, version 5.2.3790.3959, stamp 45d70ad8, debug?
0, fault address 0x0000bee7.
Is there any way to keep windows service alive/running continuously by running un-managed code in different process?
As of now we’ve tried AppDomain as different process but it failed to overcome this issue.
Please suggest a suitable solution.
Even if you spin up a new AppDomain, it’s still the same process.
Since you are already using COM, I think .NET Enterprise Services would be an optimal solution for you. Among many other features, Enterprise Services can host your COM object in a different process.