New 1.8 install errors

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hey,

I had been using 1.6 as a testing environment for a while and cannot remember running into any problems with this version. I then installed v1.8 last night on two domains, one for testing and one that is going to be live. I am now seeing lots of GDI+ errors.

Eg. If I am logged in and try to go to MY Account in my store I get an error. In the admin panel trying to add a new category or product I get one. And some other areas too.

See below errors. Can anyone advise?

Thanks in advance,

Glenn.

Error 1 -
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) +461268
   NopSolutions.NopCommerce.BusinessLogic.Media.PictureManager.GetDefaultPictureUrl(PictureTypeEnum defaultPictureType, Int32 targetSize) +1199
   NopSolutions.NopCommerce.Web.Modules.CustomerAvatarControl.BindData() +218
   NopSolutions.NopCommerce.Web.Modules.CustomerAvatarControl.Page_Load(Object sender, EventArgs e) +175
   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) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Error 2 -
Server Error in '/bikestore' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request failed.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[SecurityException: Request failed.]
   AjaxControlToolkit.HTMLEditor.EditPanel.set_ActiveMode(ActiveModeType value) +0
   AjaxControlToolkit.HTMLEditor.EditPanel.LoadPostData(String postDataKey, NameValueCollection postCollection) +159
   AjaxControlToolkit.ScriptControlBase.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +8905944
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.administration_productadd_aspx.ProcessRequest(HttpContext context) in App_Web_nccb3rst.29.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
13 years ago
https://www.nopcommerce.com/boards/t/4677/gdi-error-on-accountaspx-page.aspx
https://www.nopcommerce.com/boards/t/4933/unhandled-exception-160-on-picture-upload.aspx
https://www.nopcommerce.com/boards/t/4711/adding-new-product.aspx

try to search forums "GDI+"
13 years ago
Thanks for this,

I did search and found some of those topics. I advised my webhost about permissions but they still haven't got it sorted.

Cheers...
13 years ago
Just to advise,

This issue has now been solved. My web host came back with -

The GDI+ error was write permissions wasn't enabled in helm. I enabled them but the error wasn't fixed because helm for some reason didn't propagate the permission to the childen folders and files so I did it manually then the error moved to security as in the trust level wasn't sufficient to run the code which was sorted this morning by changing to full trust.

Hope this helps others...
13 years ago
currently I have godaddy and am on a shared server so can not have full trust. Is there anyway around this error?

[SecurityException: Request failed.]
   AjaxControlToolkit.HTMLEditor.EditPanel.set_ActiveMode(ActiveModeType value) +0
   AjaxControlToolkit.HTMLEditor.EditPanel.LoadPostData(String postDataKey, NameValueCollection postCollection) +159
   AjaxControlToolkit.ScriptControlBase.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +8905944
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.administration_categorydetails_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
13 years ago
I am on godaddy also, I had the same trust issue and it took me some time to work through, but I finally did it.
From what I understand just because you are on a shared server, it does not exclude you from having full trust for your applications root directory, which you must set up on your server. This is done through the godaddy IIS controll panel for your web site. Once you have installed the application into this directory place this line of code into your web.config file located in the applications root directory.

Copy the web.config file to local computer and edit/save with notepad. Once the file has been edited replace the file on your server.

<trust level="Full"/>

The above entry should be placed one line above the following code : </system.web>

You should also recycle your application pool in the godaddy IIS control panel, check to make sure you have read/write atributes set in godaddy file manager, and make sure that you have set or reset .net 4.0 for your site.

I finally got everything to work with no errors so far.

Hope this helps.
13 years ago
Finally! That worked for me too. I thought I tried that before. Thanks a lot!

I was getting the AJAX HTMLEditor SecurityException get_ActiveMode error, CategoryAdd and CategoryDetail errors, Product add errors, but now they are all gone!

I also messed around with Code Access Levels before adding the <trust level="Full"/> element above the </system.web> element, so I'm not sure if it was the combination of both, but one thing I am sure of adding the <trust level="Full"/> corrected all of my problems so far!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.