Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How do i give write permissios to a folder through code

How do i give write permissios to a folder through code

Scheduled Pinned Locked Moved ASP.NET
questionhelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    www Developerof NET
    wrote on last edited by
    #1

    Help!!! How do i give write permissios to a folder through code and whenever not needed i can take away the permissions. How 2 achieve this???

    D S X 3 Replies Last reply
    0
    • W www Developerof NET

      Help!!! How do i give write permissios to a folder through code and whenever not needed i can take away the permissions. How 2 achieve this???

      D Offline
      D Offline
      Davide Icardi
      wrote on last edited by
      #2

      I'm not an expert on this subject but I think that usually it is not possible because changing a folder permissions require special code permissions that the ASP.NET process doesn't have. Usually if your web application need to write on a folder you must ask the administrator to manually set the write permissions. If you use a shared hosting probably you have a control panel to set the permissions on the folder. Consider also that usually for ASP.NET 2.0 the App_Data directory is already configured with the right write permissions (if configured correctly). Davide

      1 Reply Last reply
      0
      • W www Developerof NET

        Help!!! How do i give write permissios to a folder through code and whenever not needed i can take away the permissions. How 2 achieve this???

        S Offline
        S Offline
        SGnK
        wrote on last edited by
        #3

        Yup, sorry, I'm not gonna be much help either. Try looking at chmod[^] Hopefully I'm not stering you in the wrong direction

        1 Reply Last reply
        0
        • W www Developerof NET

          Help!!! How do i give write permissios to a folder through code and whenever not needed i can take away the permissions. How 2 achieve this???

          X Offline
          X Offline
          xibeifeijian
          wrote on last edited by
          #4

          Simulate a administrator in your csharp code.:doh:

          :^):^):^):^):^):^):^):^):^):^):^):^) :^):rose::rose::rose::rose::rose:▒▒〓▒〓▒▒ :^):rose::^):^):^):^)▒〓〓〓〓〓▒ :^):rose::^):^):^):^)▒▒〓▒〓▒▒ :^):rose::^):^):^):^)▒〓〓〓〓〓▒ :^):rose::rose::rose::rose::rose:▒▒〓▒〓▒▒ :^):^):^):^):^):^):^):^):^):^):^):^)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups