HttpWebREquest results in "notfound". IE is able to find it...

D

David Rogers

When I surf to http://Englebert/Misc_Application/UpdateVersion.xml, IE
displays the XML.

However, if I:

string url = "http://Englebert/Misc_Application/UpdateVersion.xml";
HttpWebResponse Response;

//Retrieve the File
HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create(url);
Request.Headers.Add("Translate: f");
Request.Credentials = CredentialCache.DefaultCredentials;
//Set up the last modfied time header
if (File.Exists(filePath))
Request.IfModifiedSince = LastModFromDisk(filePath);
try
{
Response = (HttpWebResponse)Request.GetResponse();
}
catch(WebException e)
{
...

I always take then exception with: HttpStatusCode.NotFound


Can anyone offer guidance? This happened after running MBSA and the IIS
Lockdown tool

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top