I have a unique case here .
After lots of trials and enough of googling , i am yet not able to resolve this problem.
I have an set of libraries (third party) with runtime version 'v2.0.50727', which i have to use within my WINDOWS SERVICE application ( here is the key 'Windows Service') , which requires .Net v4.0 (v4.0.30319).
I have successfully resolved the Mixed Mode Assembly Error described all over the places.
One of the richest source of solution here :
The service after installation , does not get started. (Throws the generic timeout exception.)
The MyWindowsService service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.
Details in Event Viewer (under windows logs > Application ) specifies 2 sources
.Net Runtime ( details are as follows )
Application: MyWindowsService.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Configuration.ConfigurationErrorsException Stack: at System.Configuration.ClientConfigurationSystem.EnsureInit(System.String) at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(System.String) at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String) at System.Configuration.ConfigurationManager.get_AppSettings() at MyWindowsService..ctor() at MyWindowsService.Program.Main()
- Application Error : ( details as follows )
Faulting application name: MyWindowsService.exe, version: 1.0.0.0, time stamp: 0x53da4547 Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x53159a86 Exception code: 0xe0434352 Fault offset: 0x0000c42d Faulting process id: 0x3814 Faulting application start time: 0x01cfacc646c337dc Faulting application path: c:\Src\bin\MyWindowsService.exe Faulting module path: C:\Windows\syswow64\KERNELBASE.dll Report Id: 8d72e05a-18b9-11e4-a80e-689423ef1889
Important thing here is , if I remove this configurations from app.config - the service starts properly ( obviously breaks at runtime - coz of mixed mode assemblies), whereas keeping it in the config doesn't let it start.
Please guide me on this. Any help would be much appreciated.
P.S: 1. I have tried all the suggestions specified in the stackoverflow link above so far.
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/> </startup>
- Using VS 2012 , .Net Framework 4.0 , windows 7