若吟弱ュс若菴篆<

吾帥篏睡筝鴻<

若吟弱ュс若菴篆<

腮粋篋by fujiwara1956 » 2012綛216() 08:49

篁ヤ若吟弱ュHttpWebRequest篏睡篆<с若絽違c障茵腓冴罩c障
鐚<帥http://IP≪/с違若障
篆≦絎鴻鐚http://IP≪/user.cgi?data=<祉若&color=1
弱絎鴻鐚榊・膓障: ・膓篋障

EN-NL1068若吾с潟鐚鐚鐚鐚鐚с
障荅違篁ヤс
.NET4.0C#

System.Net.HttpWebRequest webreq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
System.Net.HttpWebResponse webres = null;
try
{
//泣若若綽膈篆<WebResponse緇
webres = (System.Net.HttpWebResponse)webreq.GetResponse();
}
catch (System.Net.WebException ex)
{
//HTTP潟若茯帥鴻
if (ex.Status == System.Net.WebExceptionStatus.ProtocolError)
{
//HttpWebResponse緇
System.Net.HttpWebResponse errres = (System.Net.HttpWebResponse)ex.Response;
//綽膈URI茵腓冴
richTextBox2.AppendText("若c障" + errres.ResponseUri.ToString() + "\n");
//Console.WriteLine(errres.ResponseUri);
//綽膈鴻若帥鴻潟若茵腓冴
richTextBox2.AppendText("{" + errres.StatusCode.ToString() + "}:{" + errres.StatusDescription.ToString() + "}\n");
//Console.WriteLine("{0}:{1}",errres.StatusCode, errres.StatusDescription);
}
else
richTextBox2.AppendText(ex.Message + "\n");鐚鐚鐚鐚с若茵腓冴障
//Console.WriteLine(ex.Message);
}
finally
{
//
if (webres != null)
{
webres.Close();
}
}
fujiwara1956
 
荐篋: 1
脂我ユ: 2012綛215(羂) 13:17

Return to 莖肢

潟ゃ潟若

若画Η筝若吟: & 蚊鴻[1篋]

cron