I am working on the homework of the Chapter 5. The first exercise to include http binding in the code is perfectly working.
The second exercise to include http binding in the config file is giving me trouble. Below is my app.config
Quote:
quote:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="WCFService.ServiceClass">
<endpoint contract = "WCFService.IServiceClass" name="NetTCPBinding_IServiceClass" binding="netTcpBinding" address="net.tcp://localhost:8000/TCPBinding" />
<endpoint contract = "WCFService.IServiceClass" name="netNamedPipeBinding_IServiceClass" binding="netNamedPipeBinding" address="net.pipe://localhost/NetNamedPipeBinding" />
<endpoint contract = "WCFService.IServiceClass" name="basicHttpBinding_IServiceClass" binding="basicHttpBinding" address="http://localhost:8001/HttpBinding" />
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IServiceClass" />
</netTcpBinding>
<netNamedPipeBinding>
<binding name="netNamedPipeBinding_IServiceClass" />
</netNamedPipeBinding>
<basicHttpBinding>
<binding name="basicHttpBinding_IServiceClass" />
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
|
After running the Host, when i try to access the service using IE, i am getting the following error
Quote:
quote:- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
- <s:Body>
- <s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode>
<faultstring xml:lang="en-US">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).</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>
|
Can somebody please help me with this. I appreciate if anybody can post their config here. The code given in the book given for tcp and namedpipes is working without issues.
Thank you