GDI+ General Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
Hey, searched the forums already for generic gdi+ error and just gdi+ and saw all of the other related issues. I tried all the suggestions listed however none of them have resolved my issue.  I've even tried running the apppool as an elevated (admin) user and I still get the error. Permissions have been set to allow writing by the elevated user, the IUSR account and the network and local services all to no avail.  Any help would be appreciated.  The error is below:

A generic error occurred in GDI+.

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.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.

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:


[ExternalException (0x80004005): A generic error occurred in GDI+.]
   System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +772265
   NopSolutions.NopCommerce.BusinessLogic.Media.PictureService.GetPictureUrl(Picture picture, Int32 targetSize, Boolean showDefaultPicture) +3470
   NopSolutions.NopCommerce.Web.Modules.HomePageProductsControl.dlCatalog_ItemDataBound(Object sender, DataListItemEventArgs e) +847
   System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e) +11238429
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +205
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +995
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +178
   NopSolutions.NopCommerce.Web.Modules.HomePageProductsControl.BindData() +250
   NopSolutions.NopCommerce.Web.Modules.HomePageProductsControl.Page_Load(Object sender, EventArgs e) +51
   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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
13 лет назад
I am also experiencing the same error.  I am able to run the program locally on my PC and all of the product pictures show up just fine.  When the website is published out to my web host is when it fails to find any of the pictures.  All of the pictures were published with the products when I created my products in the Administration area.  I am also not able to get to the Administration area to look at the products when the web site is published but again, I can locally.  It is very frustrating and I can't seem to find a solution to the problem anywhere.   I obviously seems to be looking for a product picture that is not there or a location that is not in sync with the web server.  

ANy help woudl be greatly appreciated! ThankS!
13 лет назад
Sorry - didn't realize this was a duplicate post.  

Changed the permissions on the images/thumbs directory for the network service in IIS and its fine.
13 лет назад
For me it wasn't the images directory. It was the Users group that needed full permission on the dirctory.
13 лет назад
bbqchickenrobot, you may want to restrict the permissions down to just a single user instead of the Users group, else you are giving every user on your server full permissions to the directory (this includes the IIS anonymous user).

To find out which user you need to grant permissions, in IIS 7, select application pools and right click the application pool for your nopCommerce site. Go to Advanced Options and here, under 'Process Model' there is a field called 'Identity'. The user in the identity field is the user that you need to give permissions to (although the username in this field will not have any spaces, so the user 'Network Service' is listed as 'NetworkService' for example).

Hope this helps,

Chris
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.