basicHttpBinding vs wsHttpBinding [duplicate]

Ton of material on that out there – just google for “WCF basicHttpBinding wsHttpBinding”. You’ll find amongst others: WCF : BasicHttpBinding compared to WSHttpBinding at SOAP packet level. Difference between BasicHttpBinding and WsHttpBinding and many, many more! Very basically: basicHttp is SOAP 1.1, wsHttp is SOAP 1.2 (they’re quite different, esp. when it comes to … Read more

Error in Protocol Mapping While hosting a WCF service in IIS

Amr, This sounds like you may have permission issues in the folder you .svc is running from, please can you check and see if the following permissions are there: \IIS_IUSERS \IIS_IUSR —If running webservice in Anonymous Mode For the issue with protocol Mapping, please ensure that the app Pool you are using for the IIS … Read more

WCF over SSL – 404 error

I had this same issue on my end. Your post helped me figure out what the issue was. here is my service model section. I discovered that the keys were the httpsGetEnabled then setting the bindingconfiguration I hope this helps. <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name=”RequestImageBehavior”> <serviceMetadata **httpsGetEnabled**=”true” /> <serviceDebug includeExceptionDetailInFaults=”false” /> <dataContractSerializer maxItemsInObjectGraph=”1073741824″ /> </behavior> … Read more

WCF change endpoint address at runtime

So your endpoint address defined in your first example is incomplete. You must also define endpoint identity as shown in client configuration. In code you can try this: EndpointIdentity spn = EndpointIdentity.CreateSpnIdentity(“host/mikev-ws”); var address = new EndpointAddress(“http://id.web/Services/EchoService.svc”, spn); var client = new EchoServiceClient(address); litResponse.Text = client.SendEcho(“Hello World”); client.Close(); Actual working final version by valamas EndpointIdentity … Read more

WCF error: The caller was not authenticated by the service

If you use basicHttpBinding, configure the endpoint security to “None” and transport clientCredintialType to “None.” <bindings> <basicHttpBinding> <binding name=”MyBasicHttpBinding”> <security mode=”None”> <transport clientCredentialType=”None” /> </security> </binding> </basicHttpBinding> </bindings> <services> <service behaviorConfiguration=”MyServiceBehavior” name=”MyService”> <endpoint binding=”basicHttpBinding” bindingConfiguration=”MyBasicHttpBinding” name=”basicEndPoint” contract=”IMyService” /> </service> Also, make sure the directory Authentication Methods in IIS to Enable Anonymous access

Timeouts WCF Services

Client side: SendTimeout is used to initialize the OperationTimeout, which governs the whole interaction for sending a message (including receiving a reply message in a request-reply case). This timeout also applies when sending reply messages from a CallbackContract method. OpenTimeout and CloseTimeout are used when opening and closing channels (when no explicit timeout value is … Read more

net.pipe vs. net.tcp vs. http Bindings

While not great for providing specific usage examples, here is a link from MSDN which lists all the features for the bindings. http://msdn.microsoft.com/en-us/library/ms730879.aspx Here is a decent flow chart that can help choosing between them as well. Source: http://bloggingabout.net/blogs/dennis/archive/2006/12/01/WCF-Binding-decision-chart.aspx Here is a good overall article I’ve used in the past. http://mkdot.net/blogs/dejan/archive/2008/03/31/wcf-binding-decision.aspx (or here in the … Read more

How to programmatically connect a client to a WCF service?

You’ll have to use the ChannelFactory class. Here’s an example: var myBinding = new BasicHttpBinding(); var myEndpoint = new EndpointAddress(“http://localhost/myservice”); using (var myChannelFactory = new ChannelFactory<IMyService>(myBinding, myEndpoint)) { IMyService client = null; try { client = myChannelFactory.CreateChannel(); client.MyServiceOperation(); ((ICommunicationObject)client).Close(); myChannelFactory.Close(); } catch { (client as ICommunicationObject)?.Abort(); } } Related resources: How to: Use the ChannelFactory