0
由於我的Windows服務應用程序的生產服務器上正在運行OutOfMemory異常。我們正試圖在服務app.config中添加「gcServer」設置。問題是,在添加此配置設置後,我們無法啓動服務。在app.config中添加「gcServer」配置設置後,Windows服務無法啓動
Config設置:
<Configuration>
<runtime>
<gcServer enabled="true" />
</runtime>
</Configuration>
下面所有的環節都提出這種變化對於非交互式的Microsoft .NET的Windows服務器應用程序:
http://support.microsoft.com/default.aspx?scid=kb;en-us;840523
http://msdn.microsoft.com/en-us/library/ff647790.aspx
http://blogs.msdn.com/b/junfeng/archive/2004/07/13/181534.aspx
http://stackoverflow.com/questions/794415/experience-using-gcserver-true-to-set-garbage-collector-for-net
以下是與記錄的錯誤進入eventviewer。任何人都可以幫助我們解決這個問題。
應用程序錯誤:
Faulting application name: Myapp.exe, version: 1.0.0.0, time stamp: 0x4e395587
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time stamp: 0x4ce7c78c
Exception code: 0xe0434352
Fault offset: 0x000000000000a49d
Faulting process id: 0xd90
Faulting application start time: 0x01cc51e6907b6880
Faulting application path: D:\Users\xxx\Projects\Myapp\bin\Debug\Myapp.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: ce3178ef-bdd9-11e0-8de9-7071bcbcc063
.NET運行
Application: Myapp.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.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String)
at System.Configuration.ConfigurationManager.get_AppSettings()
at Myapp..ctor()
at Myapp.Program.Main()