Re: HttpWebRequest.GetResponse returns 404 No Found error

From: warlord (smuffnstuff_at_hotmail.com)
Date: 04/02/04


Date: Fri, 2 Apr 2004 09:17:46 +0800

I probably should add that the same windows application calls a web service
one the server without any problems - it's only trying to get the Response
stream from a new Request object.

Cheers,

Cameron

"John Timney (Microsoft MVP)" <timneyj@despammed.com> wrote in message
news:ekIhJfBGEHA.700@TK2MSFTNGP09.phx.gbl...
> Could it be that you go through a proxy server normally, and your windows
> app is not providing the proxy credentials?
>
> --
> Regards
>
> John Timney
> Microsoft Regional Director
> Microsoft MVP
>
>
> "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()
> > > : }
> > > :
> > > :
> > >
> > >
> >
> >
>
>