Wcf 无法启动服务,访问被拒绝
服务无法启动。System.ServiceModel.CommunicationException: 服务端点未能侦听URI “净。tcp://ssis01:9176/SSISService_v2_0/'因为访问被拒绝。 验证当前用户是否被授予了相应的访问权限 SMSvcHost.exe.config的allowAccounts部分。--> System.ComponentModel.Win32异常:访问被拒绝 System.ServiceModel.Activation.SharedMemory.Read(字符串名称,字符串& 内容)在 System.ServiceModel.Channel.SharedConnectionListener.SharedListenerProxy.ReadEndpoint(字符串 sharedMemoryName、String和listenerEndpoint)--内部文件的结尾 异常堆栈跟踪---在 System.ServiceModel.Channel.SharedConnectionListener.SharedListenerProxy.ReadEndpoint(字符串 sharedMemoryName、String和listenerEndpoint)位于 System.ServiceModel.Channel.SharedConnectionListener.SharedListenerProxy.HandleServiceStart(布尔值 isReconnection)在 System.ServiceModel.Channel.SharedConnectionListener.SharedListenerProxy.Open(布尔值 isReconnection)在System.Ser 我尝试过的 我不是管理员,也许这就是问题所在 1) 在allowAccounts部分的SMSvcHost.exe.config中添加了我的用户SID。。然后重新启动服务,首先是NETSharing,然后是SSIS服务 2) 启动ssis服务时,会在本地计算机上引发一个错误“服务已启动并已停止。如果其他服务和程序未使用某些服务,则会自动停止。以上错误消息来自日志 以下是SMSvcHost.exe.config的配置文件Wcf 无法启动服务,访问被拒绝,wcf,Wcf,服务无法启动。System.ServiceModel.CommunicationException: 服务端点未能侦听URI “净。tcp://ssis01:9176/SSISService_v2_0/'因为访问被拒绝。 验证当前用户是否被授予了相应的访问权限 SMSvcHost.exe.config的allowAccounts部分。--> System.ComponentModel.Win32异常:访问被拒绝 System.ServiceModel.Activation.SharedMemor
<?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>
<system.serviceModel.activation>
<net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="2" receiveTimeout="00:00:10" teredoEnabled="false">
<allowAccounts>
<add securityIdentifier="S-1-5-21-873128402-3342024598-2051005476-53521"/>
</allowAccounts>
</net.tcp>
</system.serviceModel.activation>
</configuration>
我花了一些时间来解决这个问题 步骤1.在运行命令窗口中regedit.exe 步骤2:转到该位置(路径位于屏幕截图底部),以获取管理员的SID。 第三步:复制管理员的SID,在这里你会看到所有登录用户的SID。但是你只想要管理员的SID,怎么知道它是管理员? 右键单击服务并转到属性,然后单击登录选项卡。 如果您看到屏幕截图1,您将看到ProfileImagePath具有相同的名称DataSVC 步骤3:主要部件配置更改 在SMSvcHost.exe.config中添加具有管理员SID的这行代码
<system.serviceModel.activation>
<net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="2" receiveTimeout="00:00:10" teredoEnabled="false">
<allowAccounts>
<add securityIdentifier="**ADMIN SID ID HERE** "/>
</allowAccounts>
</net.tcp>
</system.serviceModel.activation>
第5步:首先重新启动NETTCP共享,然后再重新启动其他服务。应修复此错误的问题。谢谢大家,正如您在问题中提到的,您收到此错误是因为您的用户没有足够的权限,以管理员身份运行visual studio是解决此问题的一种方法。我还尝试添加了CMD命令提示符Netsh http add urlacl url=http://+:9176/SSISService_V2_0 user=domain\userWCF服务将仅在管理员权限下运行。请从管理员CMD提示符运行服务主机,或以管理员身份运行VS。