Uhh...you already are doing this. You've got the correct method, the trick is to use the correct "domain\username" and "password". If you're downloading a file from a Windows server or workstation, you need to understand how Windows networking works. If the server is in a domain environment, you need to use an account that the domain recognizes. If the server and workstation that you're code is running on are in different domains, then you need to specify the domain that the server will recognize, usually the same domain the server is in. Now, there's a catch. If you're logging the workstation in under one account and making connections to the server, you cannot use a seperate account to download the file form the same server. If the server is in a workgroup environment, then you may have to specify the name of the server as the domain part of the username.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008