can not download file

  • Thread starter Thread starter williamxifaras
  • Start date Start date
W

williamxifaras

I am trying to download a file using HttpWebRequest and
HttpWebResponse, but everytime I download a file its just the HTML.
The URL I am providing contains query string parameters as well as a
user name and password. Anyone have any suggestions.
 
have you tried entering the URL to the file in your browser and be sure it
will actually download a file?

Some "pages" look at the User-Agent string, and will disallow, so try
supplying a user-agent request header. Also, if a username and password is
required, there may be a required cookie set as well; this would need to be
transmitted along with the file request.

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
 

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

Back
Top