2011-08-15 165 views
0

我不明白这一点...我有一个WCF Windows服务,我不能设法再打电话......我总是得到这个错误:WCF Windows服务拒绝访问

无法加载文件或程序集'Microsoft.VisualBasic, Version = 8.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'或 其依赖项之一。访问被拒绝

这个东西是完美的工作,直到几天前,当我做了一些调整。无论我做什么,我都无法摆脱它。

服务配置文件是:

<system.serviceModel> 
    <services> 
    <service name="myService" 
      behaviorConfiguration="TransfertServiceBehavior"> 
     <host> 
     <baseAddresses> 
      <add baseAddress="net.tcp://localhost:8097/MyService"/> 
     </baseAddresses> 
     </host> 
     <endpoint address="" 
       binding="netTcpBinding" 
       bindingConfiguration="TransactionalBinding" 
       contract="myContract" /> 
     <endpoint address="mex" 
       binding="mexTcpBinding" 
       contract="IMetadataExchange" /> 
    </service> 
    </services> 
    <bindings> 
    <netTcpBinding> 
     <binding name="TransactionalBinding" transactionFlow="true" transferMode="Streamed" 
       maxReceivedMessageSize="1000000000"> 
     <readerQuotas maxDepth="10000" maxStringContentLength="1000000000" 
         maxArrayLength="1000000000" maxBytesPerRead="10000" 
         maxNameTableCharCount="10000" /> 
     <security mode="Transport" /> 
     </binding> 
    </netTcpBinding> 
    </bindings> 
    <behaviors> 
    <serviceBehaviors> 
     <behavior name="TransfertServiceBehavior"> 
     <serviceMetadata httpGetEnabled="False"/> 
     <serviceDebug includeExceptionDetailInFaults="False"/> 
     </behavior> 
    </serviceBehaviors> 
    </behaviors> 
</system.serviceModel> 

虽然客户端配置是在这里:

<system.serviceModel> 
    <bindings> 
    <netTcpBinding> 
     <binding name="NetTcpBinding_SI6ISupportTransfert" closeTimeout="00:01:00" 
       openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
       transactionFlow="true" transferMode="Streamed" 
       transactionProtocol="OleTransactions" 
       hostNameComparisonMode="StrongWildcard" listenBacklog="10" 
       maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" 
       maxReceivedMessageSize="65536"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
         maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <reliableSession ordered="true" inactivityTimeout="00:10:00" 
          enabled="false" /> 
     <security mode="Transport"> 
      <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /> 
      <message clientCredentialType="Windows" /> 
     </security> 
     </binding> 
    </netTcpBinding> 
    </bindings> 
    <client> 
    <endpoint address="net.tcp://localhost:8095/myService" 
       binding="netTcpBinding" 
       bindingConfiguration="NetTcpBinding_SI6ISupportTransfert" 
       contract="myContract" name="mySevice"> 
     <identity> 
      <userPrincipalName value="[email protected]" /> 
     </identity> 
    </endpoint> 
    </client> 
</system.serviceModel> 

什么会导致此任何想法 “拒绝访问” 异常???

+1

你做了什么_tweaking_? –

+0

您使用的是哪个版本的.NET?你是否改变了服务运行的身份? –

+0

你如何运行该服务?你通过网络驱动程序访问应用程序吗? – Jack

回答

1

加载.net框架DLL的时候,错误是“Access Denied”。

这可能是几件事情:

  • 了.NET Framework的版本已经从服务器
  • 这是服务器的标识不具有访问框架dll的
  • 用户删除
  • 作为服务器身份的用户密码已过期。
  • 作为服务器身份的用户密码已更改。

尝试停止并启动服务以检查密码。

尝试重新安装服务以检查.net框架版本。