c#webClient(503)服务器不可用 [英] c# webClient (503) Server Unavailable
本文介绍了c#webClient(503)服务器不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
using (var wc = new WebClient())
{
Uri urls = new Uri(url);
wc.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
dokuman.Load(wc.OpenRead(urls), Encoding.UTF8);
}
dokuman.Load错误远程服务器返回错误:(503)服务器不可用。
推荐答案
错误不言自明。这是一个服务器错误,您无法从客户端代码中做任何事情。检查您的网址是否正确。将网址粘贴到浏览器窗口中,看看是否收到同样的错误。
The error is self-explanatory. It's a server error and you can do nothing much about it from the client code. Check if your url is correct. Paste the url in a browser window and see if you get the same error.
这篇关于c#webClient(503)服务器不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文