ASP.NET拒絕訪問臨時目錄的解決方案_實用技巧

來源:互聯網
上載者:User

今天把部落格程式部署到一台阿里雲Windows主機上,通過瀏覽器訪問時出現下面的錯誤:

複製代碼 代碼如下:

建立 BlogConfigurationSettings 的配置節處理常式時出錯: 拒絕訪問臨時目錄。以其運行 XmlSerializer 的身份“IIS APPPOOL\www.cnblogs.com”沒有足夠的許可權訪問臨時目錄。CodeDom 將使用此進程用於進行編譯的使用者帳戶,因此如果使用者對系統臨時目錄沒有存取權限,則將無法編譯。使用 Path.GetTempPath() API 可找到臨時目錄位置。
Access to the temp directory is denied.  Identity 'IIS APPPOOL\www.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:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\946055b8\92eead15\App_global.asax.qakaesxx.dll”--“拒絕訪問。 ”

開始以為是“C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files”檔案夾許可權的問題,但怎麼設定這個許可權也解決不了問題。

後來在應用程式集區設定中將“載入使用者設定檔”(Load User Profile)設定為true,問題就解決。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.