°
°®ÀÏ»¢ÓÍ
This:
WebRequest request;
WebResponse response;
bool isConnected = false;
try
{
request = WebRequest.Create(targetAddress);
response = request.GetResponse();
System.Windows.Forms.MessageBox.Show(
response.GetResponseStream().ToString());
request.Abort();
response.GetResponseStream().Close();
}
catch(WebException we)
{
string errMsg = we.Message;
isConnected = false;
}
catch(Exception ex)
{
string errMsg = ex.Message;
isConnected = false;
}
finally
{
request = null;
response = null;
}
run at ppc2002 is ok,but ppc2003 throw + we {System.Net.WebException}
System.Net.WebException
errMsg = null;
my windows is win2003,developer:vs2003.net c#?
help??
WebRequest request;
WebResponse response;
bool isConnected = false;
try
{
request = WebRequest.Create(targetAddress);
response = request.GetResponse();
System.Windows.Forms.MessageBox.Show(
response.GetResponseStream().ToString());
request.Abort();
response.GetResponseStream().Close();
}
catch(WebException we)
{
string errMsg = we.Message;
isConnected = false;
}
catch(Exception ex)
{
string errMsg = ex.Message;
isConnected = false;
}
finally
{
request = null;
response = null;
}
run at ppc2002 is ok,but ppc2003 throw + we {System.Net.WebException}
System.Net.WebException
errMsg = null;
my windows is win2003,developer:vs2003.net c#?
help??