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. Path Access Error

Path Access Error

Scheduled Pinned Locked Moved Web Development
asp-netcsharphelp
3 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.
  • B Offline
    B Offline
    Brady Kelly
    wrote on last edited by
    #1

    I get the error below when trying to write a file from my ASP.NET 2.0 application. c:\inetpub\wwwroot\XpedAsp I have given the IUSR, IWAM, and ASPNET accounts Full Control on this folder, so I'm stumped as to what to try next.

    A B 2 Replies Last reply
    0
    • B Brady Kelly

      I get the error below when trying to write a file from my ASP.NET 2.0 application. c:\inetpub\wwwroot\XpedAsp I have given the IUSR, IWAM, and ASPNET accounts Full Control on this folder, so I'm stumped as to what to try next.

      A Offline
      A Offline
      Amitux
      wrote on last edited by
      #2

      Try this: In web.config add this line just below the node Amit Chowdhury

      1 Reply Last reply
      0
      • B Brady Kelly

        I get the error below when trying to write a file from my ASP.NET 2.0 application. c:\inetpub\wwwroot\XpedAsp I have given the IUSR, IWAM, and ASPNET accounts Full Control on this folder, so I'm stumped as to what to try next.

        B Offline
        B Offline
        Brady Kelly
        wrote on last edited by
        #3

        A colleague lending a fresh pair of eyes to the problem helped me discover that my actual file name was null. Using Server.MapPath on that returned only the web application root, sans file. It looks like the constructor for StreamWriter was attempting to open the root path as if it was a file, giving the access denied error.

        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