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>
什麼會導致此任何想法 「拒絕訪問」 異常???
你做了什麼_tweaking_? –
您使用的是哪個版本的.NET?你是否改變了服務運行的身份? –
你如何運行該服務?你通過網絡驅動程序訪問應用程序嗎? – Jack