I am trying to test my Rest Wcf service from the Browser.
WhenI am trying to send some values from browser I am getting the following error.
"The message cannot be processed at the receiver,
due to an AddressFilter mismatch at the EndpointDispatcher.
Check that the sender and receiver's EndpointAddresses agree."
Then I added [ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]. then I am getting a different error.
"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)."
Can we pass values to a Rest Wcf Service from a browser??
I am trying to passing following values from the browser.
http://mywebsite/Service1.svc/mymethod/Firstname,Lastname,LosAngles,CA
here is my web.confg file
<system.serviceModel>
<services>
<service behaviorConfiguration="Wcfservice1.ServiceBehavior" name="="Wcfservice1.Service1">
<endpoint address="" binding="webHttpBinding" contract="Wcfservice1.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Wcfservice1.ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<webHttp/>
endpoint behavior in your config. Unless you've specified the "WebServiceHostFactory" in theService1.svc
file this is missing, and might even account for the error you're getting. - mthierba