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. Assigning change/delete permission to a file in ASP.net applications

Assigning change/delete permission to a file in ASP.net applications

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminhelp
5 Posts 2 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.
  • S Offline
    S Offline
    sidbaruah
    wrote on last edited by
    #1

    Hi, I dont know if this is the right forum for asking this,bear with me if its not. I have a asp.net application that has a image file which needs to be replaced with a new image every time a user clicks a link. Right now i am assigning the permissions(write/delete) on the server but the problem is, everytime there is an installation the permissions have to be manually supplied. Could anyone provide an alternative approach may be to set the permissions through code.... thanks in advance...

    I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

    N 1 Reply Last reply
    0
    • S sidbaruah

      Hi, I dont know if this is the right forum for asking this,bear with me if its not. I have a asp.net application that has a image file which needs to be replaced with a new image every time a user clicks a link. Right now i am assigning the permissions(write/delete) on the server but the problem is, everytime there is an installation the permissions have to be manually supplied. Could anyone provide an alternative approach may be to set the permissions through code.... thanks in advance...

      I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      sidbaruah wrote:

      i am assigning the permissions(write/delete) on the server but the problem is,

      Are you assigning manually by taking the file properties ? Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      S 1 Reply Last reply
      0
      • N N a v a n e e t h

        sidbaruah wrote:

        i am assigning the permissions(write/delete) on the server but the problem is,

        Are you assigning manually by taking the file properties ? Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

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

        N a v a n e e t h wrote:

        Are you assigning manually by taking the file properties ?

        Yes i am manually adding User account and setting read/write/delete permissions to true.

        N a v a n e e t h wrote:

        Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.

        Is impersonation possible through the code because i wanted it without manually manipulating the permissions. I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

        N 1 Reply Last reply
        0
        • S sidbaruah

          N a v a n e e t h wrote:

          Are you assigning manually by taking the file properties ?

          Yes i am manually adding User account and setting read/write/delete permissions to true.

          N a v a n e e t h wrote:

          Consider impersonation. Before writing, impersonate a user account which have read/write access to the file.

          Is impersonation possible through the code because i wanted it without manually manipulating the permissions. I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Yes. Impersonation can be done through code. Check this[^] and this[^]

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

          S 1 Reply Last reply
          0
          • N N a v a n e e t h

            Yes. Impersonation can be done through code. Check this[^] and this[^]

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

            S Offline
            S Offline
            sidbaruah
            wrote on last edited by
            #5

            Thanks a lot. I will try that.

            I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

            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