Re: HttpWebRequest.GetResponse returns 404 No Found error
From: warlord (smuffnstuff_at_hotmail.com)
Date: 04/20/04
- Previous message: Larry: "Re: trying to post to aspx anonyomously is blocked?"
- In reply to: warlord: "Re: HttpWebRequest.GetResponse returns 404 No Found error"
- Next in thread: warlord: "Re: HttpWebRequest.GetResponse returns 404 No Found error"
- Reply: warlord: "Re: HttpWebRequest.GetResponse returns 404 No Found error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 20 Apr 2004 14:11:36 +0800
Well I've almost got to the bottom of the problem....The IIS Lockdown
utitlity had been run on the server (which I was not made aware of) and
there were two things preventing my app from working correctly.
Firstly the UrlScan utitlity was preventing the request from getting
through, hence the 404 Not Found error. Exactly what changes I need to make
to the UrlScan INI file I'm not yet sure, but at least I know the root of
the problem lies there.
Secondly, WebDAV had been disabled. This wasn't the cause of the 404 Not
Found error, but still needed enabling anyway. With this disabled (and
UrlScan not running at all) I got a 501 Not Implemented error.
So thanks to Ken pointing me in theright direction, WebDAV is now enabled.
All I have to do now is figure out the changes to UrlScan
Cheers,
Cameron
"warlord" <smuffnstuff@hotmail.com> wrote in message
news:e$wySA7FEHA.1240@TK2MSFTNGP10.phx.gbl...
> The web server is IIS 5.0, and the Url does exist. I can get to it via a
> browser without any problems - it's just from within the windows app that
it
> isn't accessible.
>
> Cheers,
>
> Cameron
>
> "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
> news:eDA1pp6FEHA.2052@TK2MSFTNGP11.phx.gbl...
> > Is the remote server an IIS 6.0 box? If so, is WebDAV enabled?
> > Does the URL requested actually exist?
> >
> > Cheers
> > Ken
> >
> > "warlord" <smuffnstuff@hotmail.com> wrote in message
> > news:uURCxk6FEHA.2428@tk2msftngp13.phx.gbl...
> > : 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()
> > : }
> > :
> > :
> >
> >
>
>
- Previous message: Larry: "Re: trying to post to aspx anonyomously is blocked?"
- In reply to: warlord: "Re: HttpWebRequest.GetResponse returns 404 No Found error"
- Next in thread: warlord: "Re: HttpWebRequest.GetResponse returns 404 No Found error"
- Reply: warlord: "Re: HttpWebRequest.GetResponse returns 404 No Found error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|