Download file - error 406

  • Thread starter Thread starter Jared
  • Start date Start date
Jared said:
Hi,

Dim wc As New System.Net.WebClient()
wc.DownloadFile("http://jared.site.net.au/resort/version.txt",
"c:\mytext.txt")

The remote server returned an error: (406) Not Acceptable

But I can see the file on IE. What is the problem?

Thanks
JAred

Jared,

Usually a 406 means you're not accepting the content type the server
wants to send. The most common example would be if your client doesn't
support gzip'd content sent by the server. Look into the header
"Accept." I think a WebClient instance has a Headers property.

Dan Manges
 

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