【问题标题】:Service cannot be started Access Denied服务无法启动拒绝访问
【发布时间】:2017-07-06 20:36:37
【问题描述】:

服务无法启动。 System.ServiceModel.CommunicationException: 服务端点未能侦听 URI 'net.tcp://ssis01:9176/SSISService_v2_0/' 因为访问被拒绝。 验证当前用户是否被授予适当的访问权限 SMSvcHost.exe.config 的 allowAccounts 部分。 ---> System.ComponentModel.Win32Exception:访问被拒绝 System.ServiceModel.Activation.SharedMemory.Read(字符串名称,字符串& 内容)在 System.ServiceModel.Channels.SharedConnectionListener.SharedListenerProxy.ReadEndpoint(字符串 sharedMemoryName, String& listenerEndpoint) --- 内部结束 异常堆栈跟踪 --- 在 System.ServiceModel.Channels.SharedConnectionListener.SharedListenerProxy.ReadEndpoint(字符串 sharedMemoryName, String& listenerEndpoint) 在 System.ServiceModel.Channels.SharedConnectionListener.SharedListenerProxy.HandleServiceStart(布尔 isReconnecting)在 System.ServiceModel.Channels.SharedConnectionListener.SharedListenerProxy.Open(布尔 isReconnecting) 在 System.Ser.

我尝试过的 我不是管理员,也许这就是问题所在

1) 在 AllowAccounts 部分的 SMSvcHost.exe.config 中添加了我的用户 SID .. 然后首先重新启动服务 NETSharing 然后是 SSISService

2) 启动 ssis 服务时,它会抛出错误“本地计算机上的服务已启动和停止。如果其他服务和程序未使用某些服务,则会自动停止。以上错误消息来自日志

这里是 SMSvcHost.exe.config 的配置文件

<?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>

【问题讨论】:

  • 我也尝试在 CMD 命令提示符 Netsh http add urlacl url=http://+:9176/SSISService_V2_0 user =domain\user 中添加服务
  • WCF 服务只能在管理员权限下运行。从管理员 cmd 提示符运行服务主机,或者以管理员身份运行 VS。

标签: wcf


【解决方案1】:

我花了一些时间来解决这个问题

步骤 1。在运行命令窗口 regedit.exe

第 2 步:转到位置(路径在屏幕截图底部),获取管理员的 SID。

Step3: 复制 Admin 的 SID,在这里你会看到所有登录用户的 SID。但是你只想要它给 ADMIN,怎么知道它是 admin ? 右键单击服务并转到属性,然后单击登录选项卡。 如果您看到屏幕截图 1,您将看到 ProfileImagePath 具有相同的名称 DataSVC

第 3 步:主要部分配置更改 在 SMSvcHost.exe.config 中添加带有 ADMIN 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共享,再重启其他服务。应该解决此错误的问题。谢谢大家

【讨论】:

    【解决方案2】:

    正如您在问题中提到的,您收到此错误是因为您的用户没有足够的权限,以管理员身份运行 Visual Studio 是解决此问题的一种方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-06-23
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 2011-05-15
      • 2013-08-13
      • 2014-12-21
      • 1970-01-01
      相关资源
      最近更新 更多