Author: Acb | Posted on: 3/5/2010 2:11:58 AM | Views : 536

Hi..i was trying to develop an asp application that can download a file from a network drive into the server local system
However when i try to use the webclient.downloadfile() method, i keep on running into this error "logon failure: unknown username or bad password".
I am sure that i was using the correct username and password.
Another strange thing is that when i try to use the similar method in a simple C# application, i also run into the similar logon failure. However after i use the window explorer to log into the network drive, i was able to download the file from network drive using the exact same method with the same username and password in the simple C# application.
Unfortunately it does not affect the asp application. The asp application still keep on having the logon failure.
This is my code which uses the webclient to download the file from network drive.

public static string DownloadHtt ...

Go to the complete details ...