I have a REST WCF service. Its using a webHttpBinding and the configuration looks like this:
<service name="IndexingService.RestService" behaviorConfiguration="IndexingService.Service1Behavior">
<endpoint
address=""
binding="webHttpBinding"
bindingConfiguration="CustomMapper"
contract="IndexingService.IIndexingService"
behaviorConfiguration="webby"/>
</service>
The CustomMapper is used to apply a custom WebContentTypeMapper, which I tried to configure like this:
<binding name="CustomMapper">
<webMessageEncoding webContentTypeMapperType="IndexingService.CustomContentTypeMapper, IndexingService" />
<httpTransport manualAddressing="true" />
</binding>
But I cannot figure out where in my web.config I should insert these lines:
- If I put these lines below I get an error, because webMessageEncoding is not a recognized element.
- If I put the lines below a custom binding tag, I get an error that wsHttpBinding does not have a CustomMapper defined!?
Can somebody explain how to use a custom type mapper together with webHttpBinding?