调用Web服务:请求因HTTP状态401失败:Unauthorized

IRSpiderWS.SaveSpiderData saveSpider  =   new  IRSpiderWS.SaveSpiderData();
            saveSpider.Url 
=  System.Configuration.ConfigurationSettings.AppSettings[ " IRSpiderWS " ];
// 如下是设置系统认证
            saveSpider.Credentials  =  System.Net.CredentialCache.DefaultCredentials;

转载于:https://www.cnblogs.com/hanguoji/archive/2007/11/28/975847.html

你可能感兴趣的:(调用Web服务:请求因HTTP状态401失败:Unauthorized)