配置系统初始化失败 - Windows服务。NET [英] Configuration System failed to initialize - Windows Service .NET

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

问题描述

我创建了一个.NET Windows服务,安装不开发计算机上的任何问题。在一个只有NET框架(和没有安装VS),因为我没有在VS 2008的提示,我做了以下的服务器

  1. 我打开命令提示符
  2. 在我做了 CD C:\ WINDOWS \ Microsoft.NET \ Framework64 \ V2.0.50727
  3. 在我试图使用 installutil.exe 的路径服务.EXE安装服务

我得到以下异常:

 微软(R).NET Framework安装实用程序版本2.0.50727.1433
版权所有(c)Microsoft公司。版权所有。

在初始化安装时出现异常:
System.Configuration.ConfigurationErrorsException:
配置系统初始化失败
 

此服务安装/卸载没有我的本地主机上的任何问题。任何帮助?

在service.exe.config看起来是这样的:

 < XML版本=1.0编码=UTF-8&GT?;
<结构>
  <的appSettings>
    <! - 应该处理的转换 - >
    <添加键=Service.EnableConversions值=真/>
    <! - 轮询间隔 - >
    <添加键=Service.Interval值=10000/> <! - 设置为10秒 - >
  < /的appSettings>
< /结构>
 

解决方案

这是一个问题,与服务器上的腐败machine.config中。重新安装后,这个问题就解决了​​。

I created a .NET windows service that installs without any issues on the dev machine. On the server that has only the .NET framework (and no VS installed), since I don't have the VS 2008 prompt, I did the following.

  1. I opened the command prompt
  2. I did cd C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727
  3. I attempted to install the service using installutil.exe "Path to the service .exe"

I get the following exception:

Microsoft (R) .NET Framework Installation utility Version 2.0.50727.1433
Copyright (c) Microsoft Corporation.  All rights reserved.

Exception occurred while initializing the installation:
System.Configuration.ConfigurationErrorsException: 
Configuration system failed to initialize

This service installs/uninstalls without any issues on my local host. Any help?

The service.exe.config looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <!-- Should process conversions -->
    <add key="Service.EnableConversions" value="true"/>
    <!-- Poll Interval-->
    <add key="Service.Interval" value="10000" /> <!-- Set to 10 seconds -->
  </appSettings>
</configuration>

解决方案

It was an issue with a corrupt machine.config on the server. After reinstalling it this issue was resolved.

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

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