access files from remote server

Discussion in 'Software' started by tanvi.sethi, Mar 29, 2010.

  1. tanvi.sethi

    tanvi.sethi

    Joined:
    Mar 29, 2010
    Messages:
    1
    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.
     
    tanvi.sethi, Mar 29, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Sale
    Replies:
    1
    Views:
    12,046
    Robin Walker
    Dec 11, 2004
  2. ikkemij@xs4all.nl

    Remote access VPNs from remote location to ASA

    ikkemij@xs4all.nl, Jun 30, 2006, in forum: Cisco
    Replies:
    2
    Views:
    944
    Walter Roberson
    Jul 1, 2006
  3. imhotep
    Replies:
    0
    Views:
    623
    imhotep
    Jun 21, 2006
  4. imhotep
    Replies:
    0
    Views:
    559
    imhotep
    Jun 23, 2006
  5. Rohan
    Replies:
    1
    Views:
    1,416
    tweety
    Nov 29, 2006
Loading...

Share This Page