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.
精彩评论