Access to the path 'C:\******\0000191.jpeg' is denied. - Image Problems

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
I keep running into an error when I'm adding a product image. Odd thing is I have created tons of products with images, and all of a sudden I continue to get this error. This is a pure install of nop 1.70, so I'm thinking this is a bug. Below is the stack trace. Any info I can get on resolving this error would be really helpful. I'm a .Net programmer, so a code/database change to reach a solution would be just fine.

Thanks in advance! - Ryan

----------------

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\nop170-povitica\NopCommerceStore\images\thumbs\0000191.jpeg' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\nop170-povitica\NopCommerceStore\images\thumbs\0000191.jpeg' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +12892935
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +2481
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +229
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +102
   System.IO.File.WriteAllBytes(String path, Byte[] bytes) +106
   NopSolutions.NopCommerce.BusinessLogic.Media.PictureManager.GetPictureUrl(Picture picture, Int32 targetSize, Boolean showDefaultPicture) in C:\Users\Ryan\Documents\My Dropbox\Work\Net Projects\Povitica\Libraries\Nop.BusinessLogic\Media\PictureManager.cs:344
   NopSolutions.NopCommerce.BusinessLogic.Media.PictureManager.GetPictureUrl(Picture picture, Int32 targetSize) in C:\Users\Ryan\Documents\My Dropbox\Work\Net Projects\Povitica\Libraries\Nop.BusinessLogic\Media\PictureManager.cs:236
   NopSolutions.NopCommerce.BusinessLogic.Media.PictureManager.GetPictureUrl(Picture picture) in C:\Users\Ryan\Documents\My Dropbox\Work\Net Projects\Povitica\Libraries\Nop.BusinessLogic\Media\PictureManager.cs:213
   NopSolutions.NopCommerce.BusinessLogic.Media.PictureManager.GetPictureUrl(Int32 imageId) in C:\Users\Ryan\Documents\My Dropbox\Work\Net Projects\Povitica\Libraries\Nop.BusinessLogic\Media\PictureManager.cs:203
   NopSolutions.NopCommerce.Web.Administration.Modules.ProductPicturesControl.gvwImages_RowDataBound(Object sender, GridViewRowEventArgs e) in C:\Users\Ryan\Documents\My Dropbox\Work\Net Projects\Povitica\NopCommerceStore\Administration\Modules\ProductPictures.ascx.cs:144
   System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +307
   System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +4572
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +94
   System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +18
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +182
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +274
   NopSolutions.NopCommerce.Web.Administration.Modules.ProductPicturesControl.BindData() in C:\Users\Ryan\Documents\My Dropbox\Work\Net Projects\Povitica\NopCommerceStore\Administration\Modules\ProductPictures.ascx.cs:52
   NopSolutions.NopCommerce.Web.Administration.Modules.ProductPicturesControl.Page_Load(Object sender, EventArgs e) in C:\Users\Ryan\Documents\My Dropbox\Work\Net Projects\Povitica\NopCommerceStore\Administration\Modules\ProductPictures.ascx.cs:68
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
13 年 前
Have you added write/modify rights for the ASPNET service on the folder:
C:\inetpub\wwwroot\nop170-povitica\NopCommerceStore\images\thumbs\ ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.