7

I have three WCF services hosted in IIS and these services are being used by my internal applications(including a WCF service) on the same machine. The need here is to restrict the outside access to WCF service. These three WCF services should be accessible only at localhost, i mean on the same machine and it should not be accessed from other mahcine. So if i type svc url from other machine : http://myHostingMachine/MyService/Service1.svc ..it should not be accessible. What is the best possible way to achieve this.

In simple way can I restrict access to SCV files using WCF configuration just to localhost??

Kamal Kr
  • 687
  • 1
  • 10
  • 22

1 Answers1

4

There are a few ways to do this;

Named pipes are probably the way to go

When to Use the Named Pipe Transport

A named pipe is an object in the Windows operating system kernel, such as a section of shared memory that processes can use for communication. A named pipe has a name, and can be used for one-way or duplex communication between processes on a single machine.

Community
  • 1
  • 1
RoelF
  • 7,483
  • 5
  • 44
  • 67
  • changing the WCF configuration is the only option. Is there any way through configuration to restrict the access to svc file itself if the request is not from localhost? – Kamal Kr Apr 26 '12 at 12:57
  • can i change the IIS settings (assuming i am using the first option) using WCF configuration – Kamal Kr Apr 26 '12 at 13:19
  • I don't think so, no. If changing the WCF configuration is the only option, you could also change the binding or not? – RoelF Apr 26 '12 at 13:22
  • here the requirement is just restrict the access to SVC file itself. So binding change is not going to help – Kamal Kr Apr 26 '12 at 13:28
  • 2
    The answer "By configuring WCF correctly" does not contain a link to a solution, it merely refers to the 4th option, named pipes. – kevinc May 11 '13 at 12:45