views:

11

answers:

1

I am trying to access a file on another server from my application. Out of application, I am able to access the files from windows explorer, but when I am using the same path in my application, I am getting the error "Could not find a part of the path F:\Unknown\ABC\DEF\MNO\Fren.jpg".

My code goes here..

 String FilePath;
 FilePath = Request.FilePath("\\\\ABC\\DEF\\MNO\\Fren.jpg");
 System.Net.Mail.Attachment a = new System.Net.Mail.Attachment(FilePath);

what is the problem in my code?

A: 

Hi,
Usually this is actually a permissions issue (not a file-not-found issue). Make sure that the account you are using for read access actually (like the IIS account, or ASPNET account, if this is done from within IIS) has permissions to read the file.

--Dave

dave wanta