Restricting WCF Service access to only localhost

自闭症网瘾萝莉.ら 提交于 2019-12-01 01:53:15

问题


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


回答1:


There are a few ways to do this;

  • in IIS itself
  • By configuring WCF correctly
  • use IIS7 and WAS
  • use named pipes (more info)
  • configure your firewall correctly

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.



来源:https://stackoverflow.com/questions/10333217/restricting-wcf-service-access-to-only-localhost

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!