Selfhosted Secure WCF by Id password using net tcp - c#

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))

Related

c# make http call to service on premise (behind firewall) using Azure Service Bus

I have a REST service on premise behind firewall, etc. The service is not exposed to the internet. I need to connect securely to that service from the internet.
I am wondering if Azure Service Bus can pass a HTTP Request to a service and return the HTTP Response?
Something like in this horible image bellow.
WCF Service Bus Client Service installed on premise
Server running in Azure
The server in Azure can issue HTTP request to custom url in premise like: http://intranet.domain.com by using Service Bus Relay.
Is this scenario possible?
You can use Hybrid connections which are a feature of Azure BizTalk Services. This lets your Azure Web or Mobile App access any on-premise resource that uses a static TCP port, such as SQL Server, HTTP Web APIs etc.
You need to install a listener agent on-premise that can connect to the machine that is running the REST service and the communication happens over a secure connection between the on-premise service and the Azure web app.
Hybrid connections overview
Setting up a hybrid connection

WCF Routing Service with NetTcpBinding and certificates

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.

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

Pushing messages from server to client in windows application (HTTP only)

I have several clients connected to a server using TCP. Because of some problems with the TCP (or the IT policies) I want to change the protocol to TCP using either web service or web API
The problem is that the HTTP is a request from client to server, but not the other way around
I want to create this option where the server can push responses to the client
Server:
.NET windows application with TCP connections, hold few clients each client has a logic instance
Client:
.net windows application with TCP connection
Because of the server architecture I don't want to use ASP.NET or other application rely on IIS.
Does WCF can provide me with this solution?
We use SignalR in one of our projects
NuGet package
Video Tutorial
IIS is not necessary, you can self-host this service (as we just do)

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