Joel
Joel

Reputation: 8948

Limit access to endpoint of WCF service hosted in IIS

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?

Upvotes: 2

Views: 1248

Answers (1)

VinayC
VinayC

Reputation: 49185

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.

Upvotes: 3

Related Questions