Wednesday, 26 October 2011

Problems Adding Rest Service Reference in Visual Studio

If you ever have to add a Service Reference for the SharePoint List WCF Service to a project in Visual Studio 2010​ you may encounter a "Bad Request" or "There was an error downloading ..." type message even though you can view the results of the same service through a browser.

The way around this is very simple and resolves the problem, however, in my mind, this should only really be done on development machines to get around this issue and not rolled out across a Live installation. What you need to do is go to IIS and change the authentication methods for the _VTI_BIN folder to disable Anonymous access. That's it. You can then successfully add the service reference.

1 comment:

  1. Since having this problem and resetting the permissions through IIS for the _VTI_BIN folder I've had problems accessing the service through the browser due to the Anonymous authentication being disabled. So, "buyer beware" - while it resolves one problem, you might find others pop up on your development machine...