Author: tanvi.sethi | Posted on: 3/29/2010 11:47:08 AM | Views : 239

Hi I have an asp.net web application. I am trying to access files from remote server (on local network) and unfortunately it isn't working out. Problem is I am not sure if the error is cos the path mentioned isn't correct or is this a problem with iis7 permissions. I have set <identity impersonate="true"... in web.config file. Below is the code i am trying to access :
 Response.AppendHeader("content-disposition", "attachment; filename=" + document.FileName);
 Response.ContentType = document.ContentType;
 String filepath = "\\<server-name>\<shared folder>\file.txt";
 Response.WriteFile(filepath); 
 Response.End();
 
I have tried every possible combination of filepath string. Nothing works. Please help.
...

Go to the complete details ...