Create or delete a directory

Discussion in 'General troubleshooting' started by sclc, Sep 2, 2012.

  1. Hi,

    I got the following message when trying to create or delete a directory.

    Code:
    if (!Directory.Exists(photoPath))
    {
    Directory.CreateDirectory(photoPath);
    }


    Error:
    Exception Details: System.UnauthorizedAccessException: Access to the path '<directory path>' is denied.
    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity.

    What do I need to do so creating/deleting a directory is allowed?

    Thanks,
    sclc
     
  2. Elshadriel

    Elshadriel Winhost Staff

    Last edited by a moderator: Oct 14, 2015
  3. Thanks for the response.

    I tried that. Id didn't work.
     
  4. ComputerMan

    ComputerMan Winhost Staff


    Sounds like your ACL permissions got misconfigured.

    Contact Support and ask them to check / reset your ACL permissions.

    Also, please read our knowledge base article on how to prevent this from happening again: ACL was altered after using VS web deploy
     
    Last edited by a moderator: Oct 14, 2015

Share This Page