开发者

Limit access to endpoint of WCF service hosted in IIS

开发者 https://www.devze.com 2023-04-12 08:27 出处:网络
I\'m hosting a WCF service in IIS 7.5. The service开发者_如何转开发 has one endpoint with webHttpBinding, and one endpoint with netTcpBinding. How can I limit access to the nettcp endpoint, so that on

I'm hosting a WCF service in IIS 7.5. The service开发者_如何转开发 has one endpoint with webHttpBinding, and one endpoint with netTcpBinding. How can I limit access to the nettcp endpoint, so that only local clients (clients running on the same machine) has access? Is it enough to just set the base address to localhost-something?


Will suggest to use NetNamedPipeBinding which is meant for on-machine communication only.

Regarding limiting access to tcp binding, I guess you can use IDispatchMessageInspector to limit the access. For example, see this code-project article that has use it for IP Address based filtering - configuring it for local IP (127.0.0.1) should get exactly what you wanted.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号