WCF Routing Service with NetTcpBinding and certificates - c#

We want to add fail over ability to our WCF clients at the client side . The clients are communicating to a WCF service that is implemented over NetTcpBinding with TransportWithMessageCredential security mode and the credential type is certificate.
Is it possible to use .Net 4.0 RoutingService without changing the real service security at all ?
The desired functionality from the router is just to pass the messages from the client to a backup service if the primary service is unavailable.

Related

WCF and Wildcard Certificates with NetTcp binding

I have a self hosted WCF service using a NetTcp binding and TransportWithMessageCredential security with a wildcard cert (*.company.com) as the service certificate.
The client address of the server is (ServerName.company.com) I get the following error when a service call is made:
Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was 'ServerName.company.com' but the remote endpoint provided DNS claim '*.company.com'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '*.company.com' as the Identity property of EndpointAddress when creating channel proxy.
Is this actually possible? Any help is appreciated.

Using reverse proxy to configure IIS hosted WCF services with SSL(https)

I have some WCF service hosted in IIS. Client (silverlight application) is consuming the service over http. Now I want to configure that service with https/SSL.
I can see there are multiple options for that.
This is the standard way.
https://msdn.microsoft.com/en-us/library/hh556232(v=vs.110).aspx
Using reverse proxy (URL rewrite)
http://weblogs.asp.net/owscott/creating-a-reverse-proxy-with-url-rewrite-for-iis
My client would send the request over https & reverse proxy server (IIS) would change/route https service request to http.
Please note my silverlight client only consumes the WCF service. There is no other client which is using that WCF service.
Can anybody tell me what is the recommenced way? What would be the advantage/disadvantage of using reverse proxy to configure WCF service with SSL?
Atul
Although you can use URL rewrite(reverse proxy) to enable https but it is not exactly meant for that. It is mainly used to explore some internal URL to external world
You should use the standard approach (mention in #1) to enable SSL.
Annu

Selfhosted Secure WCF by Id password using net tcp

I want to self host a WCF service requiring an ID and password.
This link does exactly what I need
The only problem is since I am using the service to excenge messages between to console applications it will be nice if I could use the NetTcpBinding instead of BasicHttpBinding.
Also how secure is BasicHttpBinding? I need to securely send messages between client and server (both client and server are self hosted wcf services(they are console applications))

WCF Service Hosted in Windows Service over net tcp

In my project I have one WCF Service which is hosted in a Windows Service. I hosted the WCF Service in Windows Service over netTCPBinding and Installed Windows Service. To access WCF service in my silverlight project I have added service reference of wcf.
But, when I am calling a method in WCF Service am getting the following error :
Could not connect to
net.tcp://localhost:8732/WCFHost/.
The connection attempt lasted for a time
span of 00:00:03.2951885.
TCP error code 10013: An attempt was made to
access a socket in a way forbidden by
its access permissions..
This could be
due to attempting to access a service
in a cross-domain way while the
service is not configured for
cross-domain access. You may need to
contact the owner of the service to
expose a sockets cross-domain policy
over HTTP and host the service in the
allowed sockets port range 4502-4534.
Please help me out.
For same-machine connections rather make use of Named Pipe bindings.
It might help if you showed us your service and client side endpoint configurations.
EDIT: After reading up a bit on the error you're getting (here among other sites), try changing the port number from 8732 to something between 4502-4534 as the error message suggests.
Keep same protocols at both the server and client end. May be your are calling the service with different protocols. Also check if your are using nettcp, your are having access to the machine where service is hosted.
use basicHttpBinding instead of netTCPBinding

C# Get the Client Application Checksum from the WCF Service

We are using WCF Services that transfer some data from a Client Application to the Server Application (WCF Service). This last one will apply an algorithm using these data and send back the result to the client.
We would like to authenticate the Client Application from the Server WCF Service. Would it be possible to get the Client Application Checksum directly from the WCF Service?
We are already using wsHttpBinding but we would like to add one more layer on the client application integrity.
Appreciate for your help,
Camille.
he WCF service can't get anything from the client unless the client sends it to the service. So if you can get your client to send your service the checksum (as a method parameter), then you're in business. WCF is not magic. Nor is any "service" technology for that matter. It is a simple tcp/ip communication between a client and a server. On both side, the only information that goes across is the information each side decides to send, nothing more.

Categories