IIS7 “拒绝访问临时目录”

创建 BlogConfigurationSettings 的配置节处理程序时出错: 拒绝访问临时目录。以其运行 XmlSerializer 的身份“IIS APPPOOL5656qp.com.rmi”没有足够的权限访问临时目录。CodeDom 将使用此进程用于进行编译的用户帐户,因此如果用户对系统临时目录没有访问权限,则将无法编译。使用 Path.GetTempPath() API 可找到临时目录位置。

Access to the temp directory is denied.  Identity 'IIS APPPOOLwww.cnblogs.com' under which XmlSerializer is running does not have sufficient permission to access the temp directory.  CodeDom will use the user account the process is using to do the compilation, so if the user doesnt have access to system temp directory, you will not be able to compile.  Use Path.GetTempPath() API to find out the temp directory location.

CS0016: 未能写入输出文件“c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Files oot946055b892eead15App_global.asax.qakaesxx.dll”--“拒绝访问。 ”

应用程序池设置中将“加载用户配置文件”(Load User Profile)设置为true,问题就解决。

如果问题还是没有解决,那就只有使用终极手段了

设置应用池标识为 localSystem

原文地址:https://www.cnblogs.com/xiaonanmu/p/3210457.html