File I/O Issue RRS feed

  • Question

  • User879453862 posted

    Hi all,

                I have a .net 2.0 application running on iis 6. I have created a virtual directory that maps to a file location on a different server under my website in the iis MC. I would like to access the files in the virtual directory using my application who do i go about achieving that. Any help will be much appreciated.


    Tuesday, October 7, 2008 3:23 PM

All replies

  • User-990694832 posted

    Use server.mappath to get the file location to read and then read the file.

    Also, there might be a permissions issue.

    hope this helps


    Tuesday, October 7, 2008 4:16 PM
  • User879453862 posted

    Thanks for the reply, I will try it. If you have any other suggestions please let me know. As for the permission issues i will handle those as a encoutner but i dont think i should since my app is impersonating as a domain service account and this account has read access to the folder on the file server.



    Wednesday, October 8, 2008 10:41 AM
  • User-990694832 posted

    Try using 

    path ="~/yourvirturalDirectoryName/your filename"

    if mappath is not working.

    "~/"  points the path to the root dir for the website.

    Is help needed in setting up a streamreader ?

    Hope this helps



    Thursday, October 9, 2008 2:53 PM