System.Configuration.ConfigurationErrorsException:配置系统初始化失败. [英] System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize.

查看:775
本文介绍了System.Configuration.ConfigurationErrorsException:配置系统初始化失败.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在尝试创建Windows服务,该服务将在Windows启动时执行gui应用程序.我创建了服务并添加了安装程序,但是当我尝试通过命令行安装服务时,出现以下异常:

I'm trying to create a windows service that will execute a gui application when windows start.  I created the service and added the installer, but when I try to install the service via the command line I get the following exception:

初始化安装时发生异常:
System.Configuration.ConfigurationErrorsException:配置系统初始化失败.

我研究了网络,发现很多人都在谈论app.config.我需要其中之一吗?我在此配置文件中放置什么内容以安装我的服务?

I have researched the web and I find that a lot of people talk about the app.config.  Do I need one of those?  What do I place in this config file that will get my service to install? 

任何帮助将不胜感激.

谢谢!

MJ

PS我搜索了一个C ++ .NET论坛,但没有看到.我希望这是正确的地方.如果不是,请让我知道发布此问题的适当位置.谢谢!

P.S. I searched for a C++ .NET forum, but I didn't see one.  I hope this is in the right place.  If not, please let me know the appropriate place to post this question.  Thanks!

推荐答案

詹姆斯,

您能告诉我如何安装Windows服务吗?您是否使用installutil.exe?另外,您从哪里获得此例外?您可以提供此异常的堆栈跟踪吗?这将有助于我们分析此问题.

此外,我看到一个问题,该问题是由于系统web.config文件的编码错误引起的.我认为您可以检查以确定是否有助于解决此问题:

http ://kb.parallels.com/en/3986

谢谢.

请记住,如果有帮助,请将其标记为答案;如果没有帮助,则将其取消标记.


这篇关于System.Configuration.ConfigurationErrorsException:配置系统初始化失败.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆