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 Nombre del contrato 'IMyService' no se pudo encontrar?
Esto me está volviendo loco. Tengo un servicio web WCF que funciona en mi máquina de desarrollo, pero cuando lo copio en una Máquina Virtual que estoy usando para probarlo, aparece el error que parece indicar que no estoy implementando la interfaz, pero no hace sentido porque el servicio funciona en mi windows xp IIS. la máquina virtual usa Windows Server 2003 IIS. ¿Algunas ideas?
Una cosa a tener en cuenta aquí es que obtengo este error en mi VM incluso cuando trato de acceder al servicio en un navegador web como cliente.
Nota: Estoy utilizando principalPermissionMode = "UseWindowsGroups", pero eso no es un problema en mi máquina local. Simplemente me agrego al grupo de ventanas apropiado. Pero no tuve suerte en mi VM.
Config:
<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>
¿El ensamblaje con la interfaz es visible para la aplicación? Además, ¿especificó el espacio de nombres como parte del nombre de la interfaz en el archivo de configuración? – casperOne