I fought for two days, tracking a cryptic error while compiling an ASP.NET website. Error (fairly well-known) CS0016: "Cannot write to the output file [file_name] - the directory is not valid."
I found after two days of debugging that the cause of my problem is that NetworkService somehow does not have the necessary rights to C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET files. I added “Everyone” with full rights to the folder, but I still can’t access it http://localhost, and I see that using SysInternals Process Monitor I can see that “NAME NOT FOUND” appears in the NetworkService account when trying to create a DLL - file in this directory. My interpretation is that she does not have sufficient rights to the folder.
However - when I start Visual Studio and attach the debugger, the files are compiled using my domain user (JohnDoe for reference) and for some reason this works fine - it’s as if the domain user account contains additional rights than I can not give local to users on my machine - which puzzles me a lot.
My two questions are for you guys: Why, when I add "Everyone" with full rights to the folder, NetworkService still does not have the rights necessary to create the necessary temporary files? And what rights does my JohnDoe domain user have that I cannot grant my local users on my machine?
source
share