首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >配置部分不能包含SMSvcHost.exe.config中的CDATA或text元素。

配置部分不能包含SMSvcHost.exe.config中的CDATA或text元素。
EN

Stack Overflow用户
提问于 2015-09-22 13:06:56
回答 1查看 1.4K关注 0票数 0

我无法在我的Windows7桌面上启动windows服务"SMSvcHost“。下面是事件日志中的错误消息:

代码语言:javascript
复制
A request to start the service failed.
Error Code: System.Configuration.ConfigurationErrorsException: The configuration section cannot contain a CDATA or text element. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SMSvcHost.exe.Config line 15)
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.ServiceModel.Activation.NetTcpSectionData..ctor()
at System.ServiceModel.Activation.ListenerConfig.EnsureInitializedForNetTcp()
at System.ServiceModel.Activation.TcpPortSharing.OnStart(String[] args)
Process Name: SMSvcHost
Process ID: 7016

配置文件:

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<!-- The configuration file for SMSvcHost.exe -->
<configuration>
   <runtime>
       <gcConcurrent enabled="false" />
   </runtime>
   <system.serviceModel>
      <!-- SMSvcHost ETW traces are redirected by default to an etwProviderId different from WCF's default. 
         To trace to the default provider, remove the etwProviderId attribute below. -->
       <diagnostics performanceCounters="Off" etwProviderId="{f18839f5-27ff-4e66-bd2d-639b768cf18b}"/>
   </system.serviceModel>
    <!-- Below are some sample config settings:     -->
      <system.serviceModel.activation>
       <net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="10" receiveTimeout="00:00:10" teredoEnabled="false">
         <allowAccounts>
             // LocalSystem account
             <add securityIdentifier="S-1-5-18"/>

             // LocalService account
             <add securityIdentifier="S-1-5-19"/>

             // Administrators account
             <add securityIdentifier="S-1-5-20"/>

             // Network Service account
            <add securityIdentifier="S-1-5-32-544" />

            // IIS_IUSRS account (Vista only)
             <add securityIdentifier="S-1-5-32-568"/>
         </allowAccounts>
      </net.tcp>
     <net.pipe maxPendingConnections="100" maxPendingAccepts="10" receiveTimeout="00:00:10">
         <allowAccounts>
             // LocalSystem account
             <add securityIdentifier="S-1-5-18"/>

             // LocalService account
             <add securityIdentifier="S-1-5-19"/>

             // Administrators account
             <add securityIdentifier="S-1-5-20"/>

            // Network Service account
            <add securityIdentifier="S-1-5-32-544" />

             // IIS_IUSRS account (Vista only)
             <add securityIdentifier="S-1-5-32-568"/>
         </allowAccounts>
     </net.pipe>
     <diagnostics performanceCountersEnabled="true" />
 </system.serviceModel.activation>

 </configuration>

怎么啦?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-09-22 13:35:44

好吧,我刚找到答案。类似于:

代码语言:javascript
复制
<allowAccounts>
            <!-- LocalSystem account -->
            <add securityIdentifier="S-1-5-18"/>
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32717723

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档