views:

444

answers:

1

I have a VPN in my office. One machine has windows server 2003 installed. I am coding an app in C# to upload files from a machine connected to the server machine on a shared folder.

The file transfer code has been written, but it throw Access denied exception when I run it.

However when I open the shared folder using windows explorer and key in my username and password, then it works like a charm.

I need to know why it's throwing this exception and what code should I write to automatically authenticate myself from the code without going to windows explorer and entering credentials there.

Update --

.net version is 2.0, I can upgrade if its necessary but I dont think its the issue. Iam running the application on the local machine.