I have a WCF REST service. Its use of webHttpBinding and the configuration is as follows:
<service name="IndexingService.RestService" behaviorConfiguration="IndexingService.Service1Behavior">
<endpoint
address=""
binding="webHttpBinding"
bindingConfiguration="CustomMapper"
contract="IndexingService.IIndexingService"
behaviorConfiguration="webby"/>
</service>
CustomMapper is used to apply a custom WebContentTypeMapper, which I tried to configure as follows:
<binding name="CustomMapper">
<webMessageEncoding webContentTypeMapperType="IndexingService.CustomContentTypeMapper, IndexingService" />
<httpTransport manualAddressing="true" />
</binding>
But I can't figure out where in my web.config I have to insert these lines:
- If I put these lines below, I get an error because webMessageEncoding is not a recognized element.
- If I put lines under my own anchor tag, I get an error that wsHttpBinding does not have a specific CustomMapper !?
Can someone explain how to use custom mapper type with webHttpBinding?
Achim