I've been battling an issue for several days. Among our solutions, we have an aging monolith comprising various ASP.NET technologies, as well as a WCF service, and several other Windows Services. Everything builds for my colleagues, and the services all start correctly. I hadn't worked on the monolith in a while, and when I turned my attention back to it, I experienced some various errors, including one that I still have not solved. In order for our WCF stuff to work, we have to run a Windows Service that acts as the WCF host. When I try to start this service, it bombs out, throwing up this dialog:
Windows could not start the {name of service} service on Local Computer.
Error 1064: An exception occurred in the service when handling the control request.
Checking Event Viewer, I find this .NET Runtime error in Windows Logs/Application:
Application: {redacted full path/name of WCF service host}.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Exception Info: System.IO.FileNotFoundException
at System.ServiceModel.Channels.HttpChannelListener..ctor(System.ServiceModel.Channels.HttpTransportBindingElement, System.ServiceModel.Channels.BindingContext)
at System.ServiceModel.Channels.HttpChannelListener`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.ServiceModel.Channels.HttpTransportBindingElement, System.ServiceModel.Channels.BindingContext)
at System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.ServiceModel.Channels.BindingContext)
at System.ServiceModel.Channels.Binding.BuildChannelListener[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Uri, System.String, System.ServiceModel.Description.ListenUriMode, System.ServiceModel.Channels.BindingParameterCollection)
at System.ServiceModel.Description.ServiceMetadataExtension.CreateGetDispatcher(System.Uri, System.ServiceModel.Channels.Binding, System.String)
at System.ServiceModel.Description.ServiceMetadataExtension.EnsureGetDispatcher(System.Uri, Boolean)
at System.ServiceModel.Description.ServiceMetadataBehavior.EnsureGetDispatcher(System.ServiceModel.ServiceHostBase, System.ServiceModel.Description.ServiceMetadataExtension, System.Uri, System.String)
at System.ServiceModel.Description.ServiceMetadataBehavior.CreateHttpGetEndpoints(System.ServiceModel.Description.ServiceDescription, System.ServiceModel.ServiceHostBase, System.ServiceModel.Description.ServiceMetadataExtension)
at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(System.ServiceModel.Description.ServiceDescription, System.ServiceModel.ServiceHostBase)
at System.ServiceModel.ServiceHostBase.InitializeRuntime()
at System.ServiceModel.ServiceHostBase.OnOpen(System.TimeSpan)
at System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan)
at {elided - a few more stack trace lines referring to our custom code}
Also in the same Event Viewer log, I have this Application Error (immediately after the .NET Runtime one):
Faulting application name: {service name}.exe, version: 4.2.0.0, time stamp: 0x5f0f45ce
Faulting module name: KERNELBASE.dll, version: 10.0.18362.815, time stamp: 0xb89efff3
Exception code: 0xe0434352
Fault offset: 0x000000000003a799
Faulting process id: 0xd84
Faulting application start time: 0x01d65ad32192a62b
Faulting application path: {full service path/name}.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 1db8e59a-b3a0-47e3-bb0f-5d8c6e2f8ed5
Faulting package full name:
Faulting package-relative application ID:
I've mostly been working in .NET Core with VS 2019 for the past year and a half, and so I thought maybe some configuration or SDK needed for Framework had gone missing. I still have 2017 on my machine, and that is what my colleagues prefer to use for this one monolithic solution. Now, over these several days, I have done the following:
Removed and/or installed various SDKs and targeting packs
Repaired VS 2017
Uninstalled and reinstalled VS 2017
Repaired VS 2019
Uninstalled and reinstalled VS 2019
Uninstalled and reinstalled the Windows Services many times
I've picked up the vaguest hints from web search results above my head that there could be a problem with some binding redirects. Initially I could have sworn I saw evidence that the FileNotFound was something in System.Net.Http, but now I can't seem to find whatever indicated that to me. At this point I'm completely burnt on it, and I'm considering just wiping the whole system and starting with a clean Windows installation. It would be a real shame if I were to have to do that. If you have even the vaguest hint about where to look or what to try, it would be much appreciated.
This may be due to the failure to find the WCF configuration file when the service starts, which can not start normally.
You need to check the value of the service name, the service name is not set randomly, this is the implementation class of the service interface.
The above picture is the interface and implementation class of WCF service.
For more details about hosting WCF in windows service, please refer to the link below:
https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-host-a-wcf-service-in-a-managed-windows-service
I have a small C# console application that copy to a server, where it runs just fine.
However, if I call the .exe using a shortcut from another machine, it crashes. Any dependencies are also present on the calling machine.
In the eventview on the calling machine, all I'm getting is:
Faulting module name:
KERNELBASE.dll, version: 6.2.14393.2189, time stamp: 0x5abdad60
Exception code: 0xe0434f4d
Any ideas to help?
The returned exception is an error with permissions - see the following MSDN forum post;
https://social.msdn.microsoft.com...
It surmises that by default .NET security does not allow you to run .NET programs directly from a network share. The error itself is from a COM object - "Exception from COM object".
My WPF application crashes on some different PC's.
Here is Windows Event Log:
Faulting module name: dwrite.dll, version: 6.3.9600.18696,time stamp:0x5915df3a<br/>
Exception code:0xc00000fd<br/>
Fault offset:0x0000706a<br/>
Faulting process id:0x59f8<br/>
Faulting application start time:0x01d3b7aa9dba2f15<br/>
Faulting application path:C:\Windows\SYSTEM32\dwrite.dll<br/>
Faulting package full name: <br/>
Faulting package-relative application ID:<br/>
Windows 10 and video driver are updated. dxdiag did not find any problems. Please tell me the direction to solve this problem.
Exception code 0xc00000fd is a stack overflow exception. The most likely causes of a stack overflow are infinite recursion (probably an event that keeps on calling itself, but I am not sure if your dll can prevent this by itself) or a huge value type passed as an argument to a function.
Difficult to say anything more concrete given the total absence of any code in your question.
We have a Windows Application that runs day in day out at several locations. Now though they've started crashing, they don't even generate an error on crash (should be catched by NLOG), they just stop suddenly. The only logs of the crash I can find is in the system event logger where I get 2 error logs:
Faulting application myapp.exe, version 1.0.0.0, time stamp 0x53f3377c, faulting module clr.dll, version 4.0.30319.2034, time stamp 0x52ccfa2b, exception code 0xc0000005, fault offset 0x0000ee9f, process id 0x%9, application start time 0x%10.
and
The process was terminated due to an internal error in the .NET Runtime at IP 6D09EE9F (6D090000) with exit code 80131506.
These are the descriptions in the event viewer (I can post the entire event log if it would help).
I hope someone knows how to get rid of these (I'm sick of getting calls in the night).
We've got a weird pattern of failure in one of our written services. We'll get a fault out of a system dll then a minute or so later our service will crash with or without a unhandled exception.
We'll get one of the following faulted module messages from .Net runtime error reporting:
faulting module kernel32.dll, version 5.1.2600.5781
faulting module ntdll.dll, version 5.1.2600.5755
faulting module clbcatq.dll, version 2001.12.4414.700
More than 30 seconds (but less than a minute) later we may or may not get an exception like:
System.Runtime.InteropServices.SEHException
System.AccessViolationException
exception in a MSDTC related component
System.Globalization.CultureNotFoundException
Has anyone seen this delayed/paired behavior? Both errors are reported to the event viewer. This only occurs on some physically-older XP production systems, never in dev.