Site runs but got an GDI+ error?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 years ago
Hi there,
Got the setup and database running, looks brilliant on first glance, however i got the following error:

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:

Line 66:                     ProductPictureCollection productPictures = product.ProductPictures;
Line 67:                     if (productPictures.Count > 0)
Line 68:                         hlImageLink.ImageUrl = PictureManager.GetPictureUrl(productPictures[0].Picture, 125, 125, true);
Line 69:                     else
Line 70:                         hlImageLink.ImageUrl = PictureManager.NoImageURL;


Source File: c:\Inetpub\wwwroot\GBS\store\NopCommerceWeb\Modules\ProductBox2.ascx.cs    Line: 68

Stack Trace:

[ExternalException (0x80004005): A generic error occurred in GDI+.]
   System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +397778
   System.Drawing.Image.Save(String filename, ImageFormat format) +69
   NopSolutions.NopCommerce.Common.Media.PictureManager.GetPictureUrl(Picture picture, Int32 Width, Int32 Height, Boolean showDefaultPicture) in C:\temp\rac\NopCommerce.com\Solution\Web\downloads\nopCommerce_1.10\NopCommerce\Nop.Common\Media\PictureManager.cs:195
   NopSolutions.NopCommerce.Web.Modules.ProductBox2Control.BindData() in c:\Inetpub\wwwroot\GBS\store\NopCommerceWeb\Modules\ProductBox2.ascx.cs:68
   NopSolutions.NopCommerce.Web.Modules.ProductBox2Control.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\GBS\store\NopCommerceWeb\Modules\ProductBox2.ascx.cs:48
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
15 years ago
You need to have read/write permissions on the ...images/thumbs directory.
15 years ago
Doh, sorry to disturb for such a simple one... thank you very much... amazing so far..
14 years ago
Hello i have successfully installed my nopcommerce.
But getting an error like below.
Have even changed the permission for image\thumb directory(read and write).
Please help me to solve this.
waiting for your reply.






Server Error in '/' Application.
--------------------------------------------------------------------------------

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) +377630
   System.Drawing.Image.Save(String filename, ImageFormat format) +69
   NopSolutions.NopCommerce.Common.Media.PictureManager.GetPictureUrl(Picture picture, Int32 TargetSize, Boolean showDefaultPicture) in D:\Work\Own\NopCommerce\Solution\Solution\Libraries\Nop.Common\Media\PictureManager.cs:283
   NopSolutions.NopCommerce.Common.Media.PictureManager.GetPictureUrl(Int32 imageId, Int32 TargetSize, Boolean showDefaultPicture) in D:\Work\Own\NopCommerce\Solution\Solution\Libraries\Nop.Common\Media\PictureManager.cs:133
   NopSolutions.NopCommerce.Web.Modules.HomePageCategories.dlCategories_ItemDataBound(Object sender, DataListItemEventArgs e) in D:\Work\Own\NopCommerce\Solution\Solution\NopCommerceStore\Modules\HomePageCategories.ascx.cs:67
   System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e) +8670790
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +137
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +459
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +54
   System.Web.UI.WebControls.BaseDataList.DataBind() +55
   NopSolutions.NopCommerce.Web.Modules.HomePageCategories.BindData() in D:\Work\Own\NopCommerce\Solution\Solution\NopCommerceStore\Modules\HomePageCategories.ascx.cs:52
   NopSolutions.NopCommerce.Web.Modules.HomePageCategories.Page_Load(Object sender, EventArgs e) in D:\Work\Own\NopCommerce\Solution\Solution\NopCommerceStore\Modules\HomePageCategories.ascx.cs:42
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074




Thank you.
14 years ago
What permissions did you add? Needs to be for the ASPNET user.

Hope this helps,

Ben
14 years ago
Great, that worked for me, thanks! However, I get the home page but none of the graphics/css seem to be working? any ideas?
14 years ago
Hi

Thanks a lot, worked for me too.  It would have been easy to have this information on the documentation : https://www.nopcommerce.com/Documentation/Installation.aspx

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