Bug after publishing

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
Hello!
Thanks for a script.

I downloaded 1.40 version and published on my server. Everything is fine exept modifing of products, categories etc in administrator zone.

I created my own categories, manufactors and products.

Everytime when I'm clicking on a link like http://shop.com/Administration/ManufacturerDetails.aspx?ManufacturerID=1

i see an error:

"We're sorry, an internal error occurred that prevents the request to complete.

Our supporting staff has been notified with this error and will address this issue shortly. We profusely apologize for the inconvenience and for any damage this may cause. You might want to try the same action at later time."

Log shows:


Message:   Property accessor 'ProductInfo' on object 'NopSolutions.NopCommerce.Web.Administration.Modules.ManufacturerProductsControl+ProductManufacturerMappingHelperClass' threw the following exception:'ProductManufacturerMappingHelperClass.get_ProductInfo()'
Exception:   System.Reflection.TargetInvocationException: Property accessor 'ProductInfo' on object 'NopSolutions.NopCommerce.Web.Administration.Modules.ManufacturerProductsControl+ProductManufacturerMappingHelperClass' threw the following exception:'ProductManufacturerMappingHelperClass.get_ProductInfo()' ---> System.MethodAccessException: ProductManufacturerMappingHelperClass.get_ProductInfo() ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) at System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) at System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) at System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) at System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) at System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.ReflectionPermission --- End of inner exception stack trace --- at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) --- End of inner exception stack trace --- at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) at System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) at System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) at System.Web.UI.DataBinder.Eval(Object container, String expression) at System.Web.UI.TemplateControl.Eval(String expression) at ASP.administration_modules_manufacturerproducts_ascx.__DataBinding__control6(Object sender, EventArgs e) in c:\domains\.com\wwwroot\shop\Administration\Modules\ManufacturerProducts.ascx:line 31 at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Obj


But on local version (with samle data) this editing is working fine.

When I published a solution, i check "copy only nessesary files", may be some files are missed?

How can I fix this error?

Thank you very much
14 лет назад
May be. Try to check "all project files" when publishing
14 лет назад
I changed in web.config CustomErrors option, that's a full error message:

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 for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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:

[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
   System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +284
   System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +69
   System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) +150
   System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +30
   System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +40
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +123
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) +54


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
14 лет назад
I found the reason of problem.

When I cleared table Nop_Product_Manufacturer_Mapping, now editing of manufactors is ok.

What kind of error with such message can happens during filling manufactor's profile with his products? (same for categories)
14 лет назад
I tried to upload all project files - problem is still there.

I tried to copy all files from IIS folder working local - problem is still there.

Why can i get such an error during editing of product, belongs to category?

Property accessor 'CategoryInfo' on object 'NopSolutions.NopCommerce.Web.Administration.Modules.ProductCategoryControl+ProductCategoryMappingHelperClass' threw the following exception:'ProductCategoryMappingHelperClass.get_CategoryInfo()'
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.