I have an problem with update Windows Services that running in server. I change only DLL but when i want to start it server just crash with error 1053. Event Viewer in windows show some more error :
Exception Info: System.TypeInitializationException.
I was almost sure that i just do something wrong in my code but to be sure i run this service local ( on my own laptop ) and there is no any issue service start proper. On server i have same DLL as local ( copy paste ). Have You any idea how to resolve this issue ? I need end this server fast.
private static void Main()
{
try
{
var dlls = new string[] { "Service.DataAccess", "SomeDll.Info", "SomeDll.Detail", "SomeDll.Some" };
new AssemblyLoader(dlls).Load();
XmlConfigurator.Configure();
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[] {new Service_SRV()};
ServiceBase.Run(ServicesToRun);
}
catch(Exception e)
{
RecordError(e);
throw;
}
}
I just change DLL name but there are proper no type errors. At end i want to add that i read this topic : Error 1053: the service did not respond to the start or control request in a timely fashion
Nothing helped, it's still working on the local computer, but not on the server. What sort of problem might make that local it work and on server not ?