.cshtml file with the following code:
XmlDocument xd = new XmlDocument();
xd.Load("http://remote_server/login/MyService.asmx/GetSearchData?Search="test"
returns "System.Net.WebException: The remote server returned an error: (401) Unauthorized" from some IIS servers but works fine on others:
Is this a IIS configuration issue?
Strange error, but since the webservice was on the same server as this page (windows server, last line above), we changed the address for the xd.load to:
xd.Load("http://localhost/login/MyService.asmx/GetSearchData?Search="test"
Worked fine then.