The contract name 'IMyService' could not be found in the list of contracts implemented by the service 'MyService'.. ---> System.InvalidOperationException: The contract name 'IMyService' could not be found in the list of contracts implemented by the service 'MyService'.WCF契約名 'IMyService'が見つかりませんでしたか?
これは私を夢中にしています。私は私の開発マシンで動作するWCF Webサービスを持っていますが、テスト用に使用している仮想マシンにコピーすると、インターフェイスを実装していないと思われるエラーが表示されますが、サービスは私のWindows xp IIS上で動作するので感覚。仮想マシンはWindows Server 2003 IISを使用します。何か案は?
ここで注意すべき点の1つは、クライアントとしてWebブラウザでサービスにアクセスしようとしている最中でも、このエラーがVM上で発生することです。
注:私はprincipalPermissionMode = "UseWindowsGroups"を使用していますが、ローカルマシンでは問題ありません。私はちょうど適切なウィンドウグループに自分自身を追加します。しかし、私のVMに運がない。
設定:
<configuration>
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="false" maxSizeOfMessageToLog="2147483647" />
</diagnostics>
<services>
<service behaviorConfiguration="MyServiceBehaviors" name="MyService">
<endpoint binding="basicHttpBinding" bindingConfiguration="basicHttpBinding"
name="MyService" bindingName="basicHttpBinding" bindingNamespace="http://my.test.com"
contract="IMyService">
</endpoint>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="WindowsClientOverTcp" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647" />
</binding>
</netTcpBinding>
<wsHttpBinding>
<binding name="wsHttpBinding" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehaviors">
<serviceMetadata httpGetEnabled="true" />
<serviceAuthorization principalPermissionMode="UseWindowsGroups"
impersonateCallerForAllOperations="false" />
<serviceCredentials />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
インターフェイスが表示されているアセンブリがアプリケーションに表示されていますか?また、設定ファイルのインターフェース名の一部として名前空間を指定しましたか? – casperOne