Access Denied

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maliksleo
    New Member
    • Feb 2009
    • 115

    Access Denied

    hi

    I am creating a folder through my vb code but i am getting access denied error how i can get the access my code is

    Code:
    My.Computer.FileSystem.CreateDirectory(Server.MapPath("books folder/") & foname)
    Also tell me that
    can i grant the permissions at the time of creation of a folder?

    maliksleo
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    When an ASP.NET web application is run using an "anonymous account" it runs under the ASPNET user account. This account is granted very limited user rights in order to protect the server from malicious attack.

    It is very likely that the web user (the ASPNET user) does not have sufficient permissions to create directories.

    You will have to set up your "books folder" so that the internet user is granted permissions to modify this folder.

    Comment

    • kunal pawar
      Contributor
      • Oct 2007
      • 297

      #3
      That means he has to give permission to ASP.NET user.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by kunal pawar
        That means he has to give permission to ASP.NET user.
        Yup.

        Just be aware that giving anonymous users the ability to create files and folders on the server may leave your system vulnerable to attack.

        Comment

        Working...