启动WCG服务时出现System.Configuration.ConfigurationErrorsException

时间:2014-01-03 15:16:33

标签: .net wcf

此刻有点恐慌。我正在尝试为客户安装软件更新,并以某种方式我的WCF服务失败,并给我一个我以前没有见过的错误消息。有没有人有任何想法?

Log Name:      Application
Source:        .NET Runtime
Date:          2014-01-03 16:03:36
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      SERVER.NM.LOCAL
Description:
Application: MyApp.Web.Trading.WindowsServiceHost.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.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
   at System.Configuration.BaseConfigurationRecord.GetSection(System.String)
   at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String)
   at System.Configuration.ConfigurationManager.GetSection(System.String)
   at System.ServiceModel.Activation.AspNetEnvironment.UnsafeGetSectionFromConfigurationManager(System.String)
   at System.ServiceModel.Activation.AspNetEnvironment.UnsafeGetConfigurationSection(System.String)
   at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetAssociatedSection(System.Configuration.ContextInformation, System.String)
   at System.ServiceModel.Description.ConfigLoader.LookupService(System.String)
   at System.ServiceModel.ServiceHostBase.ApplyConfiguration()
   at System.ServiceModel.ServiceHostBase.InitializeDescription(System.ServiceModel.UriSchemeKeyedCollection)
   at System.ServiceModel.ServiceHost.InitializeDescription(System.Type, System.ServiceModel.UriSchemeKeyedCollection)
   at System.ServiceModel.ServiceHost..ctor(System.Type, System.Uri[])
   at MyApp.Web.Trading.ServiceImplementations.Wcf.Start()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()

1 个答案:

答案 0 :(得分:4)

这可能是由于.config文件错误造成的。你可以检查一下,找出构造不好的xml或打开的标签吗?