Access to path xxx denied when uploading a file using c#

Hi

I have a file upload app written in c#. The app runs on IIS on a Windows 2003 Server OS. I want the app to upload the file onto the server (The app and the server are on the same machine).

This code has been working fine for a long time running on Windows Server 2000, and Windows XP Professional. Now when I moved onto Windows Server 2003, it stopped working.

I have given ASPNET account full access to the folder on the server, and it still gives this error.

Is this a bug in 2003, and can anybody assist me

Thanks

Shane


Answer this question

Access to path xxx denied when uploading a file using c#

  • Pinakin

    Most probably this is a permissions issue.

    Please note that on XP the worker processes run under NETWORK Service account on windows 2003.

    By turning on auditing, you can easily pinpoint these issues.

    1. START -> RUN -> Secpol.msc
    2. Select local policies
    3. Select Audit Policy
    4. Audit Object Access - Change this to log failures,

    Then you can look into the Event Viewer and pinpoint excatly where the issue is



  • shrek2006

    That was exactly the problem. I made the "Network Service" have full control on the folder, and the file upload was a success. Thank you very much!

    Shane

  • Access to path xxx denied when uploading a file using c#