Thread: Read/write IIS

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Posts
    1
    Rep Power
    0

    Read/write IIS


    Hi,

    I have a website hosted in IIS at location C:/inetpub/wwwroot/sample

    and there is a folder in sample C:/inetpub/wwwroot/sample/work

    I can neither read nor write a file in this work folder. I am using C# to read and write. I have set the NTFS permissions to full access, yet the problem.

    The strange thing is that when I run the same website from Visual Studio in WebDev server, it runs absolutely fine and even creates a file in C:/inetpub/wwwroot/sample/work folder! Its only when I publish it to IIS, it doesnt read/write the file

    Please Help

    Thanks
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    You have to add the IIS user, typically IUSR_<computername>. Simply setting everyone permissions on a folder doesn't give the IIS user write permissions.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo