views:

80

answers:

2

I have a C# web service on our website and I only want to be able to call it locally where its hosted - restricting access from the outside world. Whats the easiest way to do this without a login form? We cannot restrict the web service directory per ip (because I don't believe its static)

A: 

You can setup windows authentication on the web services and require the authentication be a local account to that machine. You'll have to modify your code calling it by providing network credentials, but that will prevent people from the outside calling it.

This article should explain how to do it.

Kevin
+2  A: 

Alternatively, you could also host them on a separate website, which you only bind to localhost (127.0.0.1)

PS: You should really get a static IP for your webserver. Or at least reserve an IP address for the server's mac address in your DHCP server configuration.

Thorarin