I am calling a web service from a CLR TVF in SQLServer 2008R2.
On the IIS server this service has open permissions. When tested using GET or POST requests on a browser the web service works as expected. However when the function calls the service it returns: The request failed with HTTP status 401: Unauthorized.
In the typical anectdotal way. When I run the TVF on my machine to access the service on my machine, it works. (proof that code is correct)
This error returns when using a SQL Server on the network accessing another ISS server on the network. Both servers are in the same domain.
How to determine the missing permissions that prevent this TVF from working?
