Windows 添加“;gcServer”;app.config中的配置设置

Windows 添加“;gcServer”;app.config中的配置设置,windows,service,Windows,Service,因为我们正在为我的Windows服务应用程序处理生产服务器上的内存异常。我们正在尝试在Service app.config中添加“gcServer”设置。这里的问题是,添加此配置设置后,我们无法启动服务 配置设置: <Configuration> <runtime> <gcServer enabled="true" /> </runtime> </Configuration> Faulting application

因为我们正在为我的Windows服务应用程序处理生产服务器上的内存异常。我们正在尝试在Service app.config中添加“gcServer”设置。这里的问题是,添加此配置设置后,我们无法启动服务

配置设置

<Configuration>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
</Configuration>
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
以下是登录到eventviewer的错误。有谁能帮我们解决这个问题吗

应用程序错误

<Configuration>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
</Configuration>
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()

将配置元素节点名称上的大小写更改为所有小写:

<configuration>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
</configuration>