我正在使用这个代码,这给了我问题
WebRequest req = WebRequest.Create("url");
StreamReader sr =new StreamReader(req.GetResponse().GetResponseStream());
System.Text.StringBuilder sb = new System.Text.StringBuilder();
string strLine;
// Read the stream a line at a time and place each one into the stringbuilder
while ((strLine = sr.ReadLine()) != null)
{
// Ignore blank lines
if (strLine.Length > 0) sb.Append(strLine);
}
sr.Close();
lbl.Text= sb.ToString();
我收到这个错误
The remote server returned an error: (503) Server Unavailable