2012-12-06 77 views
1

我想在果園中插入圖片amdin頁面,但我得到一個錯誤果園無法訪問媒體文件 - 訪問被拒絕

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back 

The folder could not be created at path: . System.UnauthorizedAccessException: Access to the path 'D:\Projects\MySite.Web\Media\Default' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj) at Contrib.MediaFolder.Services.RemoteStorageProvider.ListFolders(String path) 

System.ArgumentException: The folder could not be created at path: . System.UnauthorizedAccessException: Access to the path 'D:\Projects\MySite.Site.Web\Media\Default' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj) at Contrib.MediaFolder.Services.RemoteStorageProvider.ListFolders(String path) at Contrib.MediaFolder.Services.RemoteStorageProvider.ListFolders(String path) at Orchard.Media.Services.MediaService.GetMediaFolders(String relativePath) at Orchard.MediaPicker.Controllers.AdminController.Index(String name, String mediaPath) at lambda_method(Closure , ControllerBase , Object[]) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) 

我設置的所有權限爲所有用戶(IUSR,系統,管理員,用戶)到媒體文件夾,但仍然出現錯誤。請幫我解決這個問題。提前致謝!

+0

您是否檢查過您的應用程序池在哪個用戶下運行?確保此用戶有權修改該文件夾。 –

+0

另一件要檢查的事情是,它不是簡單的只讀,這是容易忽略的。 –

回答

0

我有同樣的問題,將媒體文件夾的內容複製到一個新文件夾,刪除媒體文件夾,並將新文件夾重命名爲媒體和設置IIS_IUSRS的權限,似乎解決了問題。