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. System.UnauthorizedAccessException: Access to the path "server/file_share" is denied

System.UnauthorizedAccessException: Access to the path "server/file_share" is denied

Scheduled Pinned Locked Moved ASP.NET
helpsysadminwindows-adminsecuritytesting
8 Posts 3 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.
  • M Offline
    M Offline
    mayl
    wrote on last edited by
    #1

    Hi, I have a development and testing environment. I have set the the following on my web.config file: authentication mode="Windows" identity impersonate="true" And I'm trying to list directories and its subfolders and files from a different file_server/shared on my page. In my development environment, it is working fine. I was able to see the folders and files, but in the testing it is giving me: System.UnauthorizedAccessException: Access to the path "file_server/shared" is denied. On both development and testing IIS, I have the "Integrated Windows authentication" checked only. I granted "Everyone" and "Authenticated Users" read only to the file_server/shared. My codes are exactly the same on both environments. I'm also able to get the "WindowsIdentity.GetCurrent.Name" on both environments. I'm totally puzzled. Can anyone help me on how to troubleshoot this? Thank you very much May

    V R 2 Replies Last reply
    0
    • M mayl

      Hi, I have a development and testing environment. I have set the the following on my web.config file: authentication mode="Windows" identity impersonate="true" And I'm trying to list directories and its subfolders and files from a different file_server/shared on my page. In my development environment, it is working fine. I was able to see the folders and files, but in the testing it is giving me: System.UnauthorizedAccessException: Access to the path "file_server/shared" is denied. On both development and testing IIS, I have the "Integrated Windows authentication" checked only. I granted "Everyone" and "Authenticated Users" read only to the file_server/shared. My codes are exactly the same on both environments. I'm also able to get the "WindowsIdentity.GetCurrent.Name" on both environments. I'm totally puzzled. Can anyone help me on how to troubleshoot this? Thank you very much May

      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      mayl wrote:

      I have a development and testing environment.

      What is the development environment you meant to say? Is it your machine which you used for development?? Whats is the OS or IIS version used in it? Whats is the OS or IIS version used in your testing environment?

      [Venkatesh Mookkan] My: Website | Yahoo Group | Blog Spot

      M 1 Reply Last reply
      0
      • M mayl

        Hi, I have a development and testing environment. I have set the the following on my web.config file: authentication mode="Windows" identity impersonate="true" And I'm trying to list directories and its subfolders and files from a different file_server/shared on my page. In my development environment, it is working fine. I was able to see the folders and files, but in the testing it is giving me: System.UnauthorizedAccessException: Access to the path "file_server/shared" is denied. On both development and testing IIS, I have the "Integrated Windows authentication" checked only. I granted "Everyone" and "Authenticated Users" read only to the file_server/shared. My codes are exactly the same on both environments. I'm also able to get the "WindowsIdentity.GetCurrent.Name" on both environments. I'm totally puzzled. Can anyone help me on how to troubleshoot this? Thank you very much May

        R Offline
        R Offline
        Ravenet
        wrote on last edited by
        #3

        Hi Guy can i know about your OS and development envoriment? becuase of if u Vista,little triky...

        Cheers RRave MCTS,MCPD

        M 1 Reply Last reply
        0
        • V Venkatesh Mookkan

          mayl wrote:

          I have a development and testing environment.

          What is the development environment you meant to say? Is it your machine which you used for development?? Whats is the OS or IIS version used in it? Whats is the OS or IIS version used in your testing environment?

          [Venkatesh Mookkan] My: Website | Yahoo Group | Blog Spot

          M Offline
          M Offline
          mayl
          wrote on last edited by
          #4

          Hi, We have 2 separate servers, one for development and one for testing. The OS is Windows 2000 and IIS version 5. thank you

          1 Reply Last reply
          0
          • R Ravenet

            Hi Guy can i know about your OS and development envoriment? becuase of if u Vista,little triky...

            Cheers RRave MCTS,MCPD

            M Offline
            M Offline
            mayl
            wrote on last edited by
            #5

            It's not Vista. Both environment are using Windows thank you

            R 1 Reply Last reply
            0
            • M mayl

              It's not Vista. Both environment are using Windows thank you

              R Offline
              R Offline
              Ravenet
              wrote on last edited by
              #6

              OK so can u give a full rights to parent folder. or use ACL in .net

              Cheers RRave MCTS,MCPD

              M 1 Reply Last reply
              0
              • R Ravenet

                OK so can u give a full rights to parent folder. or use ACL in .net

                Cheers RRave MCTS,MCPD

                M Offline
                M Offline
                mayl
                wrote on last edited by
                #7

                I gave full rights but still the same problem. How do you use ACL in .net? thank you

                R 1 Reply Last reply
                0
                • M mayl

                  I gave full rights but still the same problem. How do you use ACL in .net? thank you

                  R Offline
                  R Offline
                  Ravenet
                  wrote on last edited by
                  #8

                  Yes ACL is high level secuity reigth force by the code. See this link http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.directorysecurity.aspx[^] http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.aspx[^] and i will give a sample code also very soon. Thanks

                  Cheers RRave MCTS,MCPD

                  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