What is the difference between a WCF Service Application and a WCF Service Library?

A service application includes a website host already setup for you. A service library is a library of services that a host can reference and startup. If you start with a service library (recommended) you can then choose any host you wish (a windows service, IIS/ASP.NET, or even a console application) and you’d just reference … Read more

xmlHttp.getResponseHeader + Not working for CORS

First, a little background: You are using Access-Control-Allow-Headers, which specifies which request headers the client is allowed to send, but you are not specifying which response headers the client is allowed to read. To allow the client to read non-simple response headers, you need to use Access-Control-Expose-Headers. From the HTML5 Rocks CORS page: During a … Read more

WCF Transport vs Message

Security in WCF actually consists of several features. The difference between those two is how are messages signed and encrypted. Transport security provides only point-to-point channel security. It means that HTTPS establish secure channel only between client and server exposed to client. But if this server is just a load balancer or reverse proxy server … Read more

Passing FormsAuthentication cookie to a WCF service

It sounds like you’re looking for the Windows Communication Foundation Authentication Service. EDIT: After re-reading the question more carefully (and after Ariel’s comment) I’d like to retract the above suggestion. The WCF Authentication Service won’t add much to this scenario. I haven’t done this between WCF and ASP.NET, however I have configured ASP.NET applications to … Read more

Correct way communicate WSSE Usernametoken for SOAP webservice

If you need to send UserName over HTTPS you can use standard approach (if your WSDL is correctly defined this should be created for you automatically by adding service reference): <bindings> <basicHttpBinding> <binding name=”secured”> <security mode=”TransportWithMessageCredential”> <message clientCredentialType=”UserName” /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint name=”…” address=”https://…” contract=”…” binding=”basicHttpBinding” bindingConfiguration=”secured” /> </client> Ar you can … Read more

WCF Error “This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case”

We had this issue as the host server had been updated to use TLS V1.2 and we were connecting using standard SSL. This was an update made as part of pen testing of the sites. We saw the issue in code connection, but not browsers going to the wsdl. Below code resolved: if (System.Net.ServicePointManager.SecurityProtocol == … Read more