I’ve got a server running some WCF services. It’s located within my company’s internal network. I’d like to expose its services to the internet, but I don’t want to expose the server directly.
Is there a way to set up a server in our DMZ to act as a proxy to the internal server? Ideally, a solution would require minimal code on the proxy server, and not require changes to the services to be published twice.
The best way to do what you want is to use the built-in WCF 4 Routing Service. You can do a lot more than just redirect calls from another server to your internal services. This is all configuration driven so you don’t need to change your service contracts or recompile any code. You can even expose services using one binding and invoke the target service with a different binding.
EDIT:
The MSDN provided samples for the RoutingService are a good starting point to see working examples of RoutingService configurations. Like more things WCF, wading through the documentation is a tedious but almost always necessary cost to learning how to use the damn thing 🙂