1. 程式人生 > >.net 報錯access to the path c:\tempimagefiles\msc_cntr_0.txt is denied

.net 報錯access to the path c:\tempimagefiles\msc_cntr_0.txt is denied

報錯資訊:

 

 解決方法:

在 Web.Config 的 <System.Web> 里加 <identity impersonate="true"/> 節點即可 .
解釋 : 對你要操作的檔案目錄增加使用者,也就是 ASP.net 的使用者,一般都是 “IUSER_computerName”

右擊使用的資料夾,屬性->安全->user的許可權都開啟。