簡體   English   中英

在服務器上拒絕訪問路徑

[英]Access to path is denied on server

我正在嘗試進行多文件上傳功能(來自http://msdn.microsoft.com/zh-cn/library/aa478971.aspx的最后一個示例)

我將上傳位置更改為

"httpContext.Current.Server.MapPath("~/images/")

當我上傳文件時,它說

拒絕訪問路徑“ D:....”。

由於某種原因,我無法為服務器上的文件夾設置權限。 我還可以做些什么?

所有幫助表示贊賞。 謝謝!

您的asp.net帳戶{MACHINE}\\ASPNET沒有對該位置的寫權限。 這就是它失敗的原因。

考慮將資源的訪問權限授予ASP.NET請求標識。

-右鍵單擊下載文件夾的Properties > Security Tab > Edit > Add > locations > choose your local machine > click OK > Type ASPNET below "Enter the object name to select" > Click Check Names Check the boxes for the desired access (Full Control). If it will not wok for you do the same with Network Service Properties > Security Tab > Edit > Add > locations > choose your local machine > click OK > Type ASPNET below "Enter the object name to select" > Click Check Names Check the boxes for the desired access (Full Control). If it will not wok for you do the same with Network Service

現在,這應該顯示您的本地{MACHINENAME}\\ASPNET帳戶,然后您對此帳戶設置了寫權限。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM