access files from remote server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tanvisethi
    New Member
    • Mar 2010
    • 1

    access files from remote server

    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="tr ue"... in web.config file.
    Below is the code i am trying to access :

    Response.Append Header("content-disposition", "attachment ; filename=" + document.FileNa me);
    Response.Conten tType = document.Conten tType;
    String filepath = "\\<server-name>\<shared folder>\file.tx t";
    Response.WriteF ile(filepath);
    Response.End();

    I have tried every possible combination of filepath string. Nothing works. Please help.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I would say its permissions.
    The server computer needs to have access to that remote file server. And I believe its IUSR_PLATERDELL (or ASPNET) is the user account that needs access permissions to the share.

    Comment

    Working...