Home All Groups Group Topic Archive Search About

NetworkCredentials and webclient - help

Author
30 Mar 2007 1:22 PM
JP
I want to take a file on my web server and load it into a byte array. First I
tried loading using FileStream, but I get 401 Unauthorized. So I decided to
use WebClient.DownloadData() which allows me to refer to the file via URI and
automatically loads the file into a byte[].

However, I’m still have problems with NetworkCredentials. I still get 401
Unauthorized. I set the NetworkCredentials = Credentials.Default hoping it
would use the IUSER account to get the file sense Im referencing it via URI.
But nothing works.

What do the settings need to be for NetworkCredentials properties to allow
IUSER to get the file being referenced? The  file is located within root of
the website. Any visitor to the site should be able to access this file.

--
JP
..NET Software Developer

AddThis Social Bookmark Button