ContractFilter mismatch at the EndpointDispatcher
Posted
by Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2010-03-26T04:57:40Z
Indexed on
2010/03/26
5:03 UTC
Read the original article
Hit count: 1010
I've created a simple WCF service but when I use Visual Studio to add a service reference, this error comes up.
The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
Here is my Interface
[ServiceContract]
public interface IService
{
[OperationContract]
DateTime GetTime();
}
And my implementation
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class TestService : IService
{
public DateTime GetTime()
{
return DateTime.Now;
}
}
Finally here is my web.config
<system.serviceModel>
<client/>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<service name="Test.TestService" >
<endpoint address="" contract="Test.IService" binding="basicHttpBinding" >
</endpoint>
</service>
</services>
</system.serviceModel>
© Stack Overflow or respective owner