c# - Virtual user XXX Logged in while downloading file -


i using webclient class downloading files given url . using following function save on local server,

webclient wb = new webclient(); networkcredential creds = new networkcredential("my username", "my password"); iwebproxy proxy = httpwebrequest.defaultwebproxy; wb.proxy = proxy; wb.credentials = creds; wb.downloadfile("source url", "c://downloaded.rpt.rsp"); 

but after processing destination file contains

virtual user xxx logged in successfully

your code seems correct. did try manually download file via web-browser (like ie or chrome) , see downloads ? if still gets that, maybe server re-directing url somewhere. plz check.

just reference, minimal code (without auth , proxy) download file.

using (webclient client = new webclient ()) {     client.downloadfile("http://www.abc.com/file/song/a.mpeg", "a.mpeg"); } 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -