On the hosting of my WCF service called "SimpleWCF" on IIS; I get the following error while browsing manually;
The contract name 'iMateDataExchange' service was not found in the list of contracts applicable by Simple WorkersF. To enable support for this contract, add the servicematebeaver at the configuration file or service host.
I do not understand the reason for this error [still new].
This is my configured file;
& lt; Configuration & gt; & Lt; System.serviceModel & gt; & Lt; Behavior & gt; & Lt; Endpoint beehaviors & gt; & Lt; Transaction name = "" & gt; & Lt; WebHttp / & gt; & Lt; / Behavior & gt; & Lt; / EndpointBehaviors & gt; & Lt; ServiceBehaviors & gt; & Lt; Transaction name = "" & gt; & Lt; ServiceMetadata httpGetEnabled = "true" /> & Lt; The services included in the debugging include exceptions = DishialInstine = "false" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; Binding & gt; & Lt; BasicHttpBinding & gt; & Lt; Binding name = "louddata" maxbfarceases = "2147483647" maxriseasevysajism = "2147483647" & gt; & Lt; ReaderQuotas maxDepth = "2147483647" maxStringContentLength = "2147483647" maxArrayLength = "2147483647" maxBytesPerRead = "2147483647" maxNameTableCharCount = "2147483647" /> & Lt; Safety Mode = "None" & gt; & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / BasicHttpBinding & gt; & Lt; / Binding & gt; & Lt; Service hosting environment aspNetCompatibilityEnabled = "true" /> & Lt; Services & gt; & Lt; Service name = "simplefree" & gt; & Lt; Endpoint address = "http: //localhost/Sample/SimpleWCF.svc" binding = "basic HttpBinding" binding configuration = "big data" contract = "simple WPC" /> & Lt; Endpoint address = "Max" binding = "MaxHttpending" contract = "IMAXADEXXchange" /> & Lt; / Services & gt; & Lt; / Services & gt; & Lt; /system.serviceModel> & Lt; System.web & gt; & Lt; Compilation debug = "true" /> & Lt; /system.web> & Lt; / Configuration & gt;
In your config, you must give a valid name to behave!
& lt; Behaviors & gt; & Lt; Endpoint beehaviors & gt; & Lt; Transaction name = "webbavic" & gt; & Lt; WebHttp / & gt; & Lt; / Behavior & gt; & Lt; / EndpointBehaviors & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior name = "service" & gt; & Lt; ServiceMetadata httpGetEnabled = "true" /> & Lt; The services included in the debugging include exceptions = DishialInstine = "false" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt;
and your & lt; Services & gt; With
tags, you need context for that behavior:
& lt; Service name = "simplevcf" transaction support = "service" & gt; If you are on .NET 4 / WCF 4, you can also define the default behavior - but then you have to leave it completely name =
Out of attribute:
& lt; Behaviors & gt; & Lt; Endpoint beehaviors & gt; & Lt; Behavior & gt; & Lt; WebHttp / & gt; & Lt; / Behavior & gt; & Lt; / EndpointBehaviors & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior & gt; & Lt; ServiceMetadata httpGetEnabled = "true" /> & Lt; The services included in the debugging include exceptions = DishialInstine = "false" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt;
Now each endpoint will receive that endpoint behavior, and each service will get service behavior.
Comments
Post a Comment