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

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

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

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

Silverlight Accessing WCF and CrossDomainAccessPolicy without IIS

I have a Windows Service that exposes a WCF service and so I'm not using IIS. I'm suddenly getting the famous SecurityException that mentions using a cross-domain policy when I try to access the service from a Silverlight app. However, since I'm not using IIS, does that mean I need to have a web server on the same port as my WCF service just to serve this file? Is there a better way to do it?
You can add another service with webHttpBinding (REST) that serves out ClientAccessPolicy.xml file. Then in your Windows Service, you can start that endpoint along with the other one so that Silverlight clients can get the cross-domain policy file. You can find more information in below links:
Step By Step - Using Silverlight to Access a WCF Service Hosted In a Console Application
Self hosted WCF service and enabling cross domain calls

Avoiding a double serialize/deserialize

I have a WCF webservice that acts as a proxy between a WCF windows service and a client interface. This is done so that our program can have a central "state" server, while the webservices can be distributed.
Ideally i would like to cut out the middle IIS hosted WCF webservice serialization and feed the bytes sent by the client directly to the windows service via IIS. Is this possible?
Why not using NLB directly? I think that a cluster will do a better job distributing requests than a proxy WCF service.
It's possible but you'll want to not use WCF in the middle. The level of difficulty depends on the technology you're using for your transport. For example, if you're using BasicHttp (good ol' SOAP) you can write a proxy in ASP.NET that routes the bytes from the client to the server via an HttpWebRequest.
You also could consider installing a reverse proxy on your web boxes to route your WCF requests through to your central web service.

How do I implement HTTP Streaming by utilising IIS Web Server for my application in C#/ASP.Net?

How do I implement HTTP Streaming by utilizing IIS Web Server for my application in C#/ASP.Net?
Do I need to poll the web server from the client?
Check WCF streaming as explained in msdn.

Categories