Write into file from a Handler - UnauthorizedAccessException


I've a Handler for my web application and try to write to a file:

The response is ever, that I've no rights to write there - UnauthorizedAccessException ...
The path is right in the error message: "C:\inetpub\wwwroot\webapp\test.xml"

How can I solve this problem?

Who is Participating?
Praveen VenuTechnical Project ManagerCommented:
This is because the ASPNET account and the NETWORK SERVICE account do not have the correct permissions..

Right click the folder webapp and select properties. Then add all rights to ASPNET and NETWORK SERVICE users
andre72Author Commented:
Works for me, thanks a lot!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.