M
mroffey
Hi I'm using the code below to post to a web form, but when I run it, i
get System.Net.WebException: The operation has timed-out.
error
Obviously something is wrong, can anyone give me a clue?
string url = "http://localhost/testapp/test.asp";
HttpWebRequest myHttpWebRequest =
(HttpWebRequest)WebRequest.Create(url);
myHttpWebRequest.Credentials = new NetworkCredential("username",
"password", null);
myHttpWebRequest.Method = "POST";
try
{
HttpWebResponse myHttpWebResponse =
(HttpWebResponse)myHttpWebRequest.GetResponse();
}
catch (Exception e)
{
Response.Write (e.ToString()
}
The error I get is
System.Net.WebException: The operation has timed-out. at
System.Net.HttpWebRequest.GetResponse()
I've set the test.asp file to write out a text file if it receives a
POST request. Its getting nothing.
Thanks in advance for any help you can give.
Mark
get System.Net.WebException: The operation has timed-out.
error
Obviously something is wrong, can anyone give me a clue?
string url = "http://localhost/testapp/test.asp";
HttpWebRequest myHttpWebRequest =
(HttpWebRequest)WebRequest.Create(url);
myHttpWebRequest.Credentials = new NetworkCredential("username",
"password", null);
myHttpWebRequest.Method = "POST";
try
{
HttpWebResponse myHttpWebResponse =
(HttpWebResponse)myHttpWebRequest.GetResponse();
}
catch (Exception e)
{
Response.Write (e.ToString()
}
The error I get is
System.Net.WebException: The operation has timed-out. at
System.Net.HttpWebRequest.GetResponse()
I've set the test.asp file to write out a text file if it receives a
POST request. Its getting nothing.
Thanks in advance for any help you can give.
Mark