The request failed with HTTP status 401: Unauthorized
问题 I have a .NET 2.0 website (VB) running in my IIS6 (XP Pro SP2) and a .NET 3.5 (configured as .NET2 under IIS's ASP.NET tab, of course) hosting an ASMX web service. In Chrome, I can call the ASMX and invoke the web methods successfully. However, in calling the web methods in code, from the .NET 2.0 website I get: The request failed with HTTP status 401: Unauthorized. How do I get around this? 回答1: You need to set the credentials in you application when you initialise the webService object.