I’m attempting to write to a logfile, but File.Write(path, string) is not giving me access.
This is the error message:
Access to the path 'C:\Windows\SysWOW64\inetsrv\20130213190451765 49cb4a74-de61-49e5-93de-94d982073f89.txt' is denied.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The path is given via
Server.MapPath("~"). I’d advise against making the root folder of your site writeable in most cases. Why not choose a different, isolated location and give write permission to your app pool identity for that location?