The solution to the problem of IIS access to temp directory

  • 2020-05-10 23:11:59
  • OfStack

Denied access to the temp directory. The logo "NT AUTHORITY\NETWORK SERVICE" used to run XmlSerializer does not have sufficient permissions to access the temp directory. CodeDom will compile using the user account that the process is using, so if the user does not have access to the system's temp directory, it will not compile. Find the location of the temp directory using Path.GetTempPath () API.

Note: during the execution of the current Web request, an unhandled exception occurred. Check the stack trace information for more information about this error and the source of the error in the code.

Sometimes the server will inexplicably appear above problems, this problem is obviously a permission problem, the problem is that the windows directory temp directory under the windows directory for any Settings of our authority does not work, after another error debugging found the following ideas, to share with you netizens.

The reason for this problem occurred twice is that I operated a batch file to clean up garbage and cleaned up some files. At that time, there was no problem. Later, this kind of problem appeared.

1, temp directory permission is correct under the case of reboot 1 computer, 1 general can be

2. Set the read and write permission of NETWORK SERVICE for temp; The next step is the key, stop the iis service, which will aspnet

Related articles: