W
warlord
I have a windows client app that is trying to download a file from
a web server but I always get the following error when I call the
GetResponse method of the Request object.
The remote server returned an error: (404) Not Found.
When I run it against a website on my local machine everything works
perfectly, but not against the remote server. I'm sure it's a security
or permissions problem of some sort, but I'm not sure where to start.
The code I'm using is below.
Thanks in advance for any help.
Cameron
HttpWebResponse Response;
//Retrieve the File
HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create(url);
Request.Headers.Add("Translate: f");
Request.Credentials = CredentialCache.DefaultCredentials;
try
{
Response = (HttpWebResponse)Request.GetResponse();
}
catch(WebException e)
{
//Handle the exception here
}
finally
{
Response.Close()
}
a web server but I always get the following error when I call the
GetResponse method of the Request object.
The remote server returned an error: (404) Not Found.
When I run it against a website on my local machine everything works
perfectly, but not against the remote server. I'm sure it's a security
or permissions problem of some sort, but I'm not sure where to start.
The code I'm using is below.
Thanks in advance for any help.
Cameron
HttpWebResponse Response;
//Retrieve the File
HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create(url);
Request.Headers.Add("Translate: f");
Request.Credentials = CredentialCache.DefaultCredentials;
try
{
Response = (HttpWebResponse)Request.GetResponse();
}
catch(WebException e)
{
//Handle the exception here
}
finally
{
Response.Close()
}