tags:

views:

23

answers:

1

I'm kind of a newb to WCF Web Services and have created a service.

Here is what I'm after:

  • If someone vists http://somesite.com/Poo.svc they are rejected straight off the bat (404 or something)
  • Only I can add a reference to the service in VS.

What I'm after is making the WCF service totally private.

Any ideas?

+1  A: 

Add a machine certificate to your machine, and use that certificate to authenticate yourself against the service. Anyone who cannot present that certificate will be rejected.

Read the How To – Use Certificate Authentication and Message Security in WCF calling from Windows Forms article on Codeplex for detailed instructions on how to do this.

However, this won't prevent others from trying to add a service reference in Visual Studio. Except for not telling anyone about the service endpoint, there's really not much you can do to prevent that - at least not on the service level. You'd almost have to reject all incoming requests to that URL on a firewall or something.

marc_s