限制仅对localhost的WCF服务访问 [英] Restricting WCF Service access to only localhost

查看:104
本文介绍了限制仅对localhost的WCF服务访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IIS中托管了三个WCF服务,这些服务正由我的内部应用程序(包括WCF服务)在同一台计算机上使用。这里需要限制对WCF服务的外部访问。这三个WCF服务只能在localhost访问,我的意思是在同一台机器上,不应该从其他机器访问它。
所以如果我从其他机器输入svc url: http://myHostingMachine/MyService/Service1.svc ..不应该是可访问的。实现这一目标的最佳方法是什么。

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.

以简单的方式,我可以使用WCF配置限制对SCV文件的访问仅限于localhost吗?

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

推荐答案

有几种方法可以做到这一点;

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


何时使用命名管道运输

命名管道是Windows操作系统内核中的对象,例如进程可用于通信的共享内存部分。命名管道具有名称,可用于单台计算机上的进程之间的单向或双向通信

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.

这篇关于限制仅对localhost的WCF服务访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆