YSOD trying to edit email templates

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
candland
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Thu May 13, 2010 11:11 am

YSOD trying to edit email templates

Post by candland » Thu May 13, 2010 11:39 am

From the admin screens I get the following when I try to edit email templates. Site is running in medium trust.

--------------------------------------------------------------------------------------------------------------------------
Server Error in '/' 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 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.3607; ASP.NET Version:2.0.50727.3082

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: YSOD trying to edit email templates

Post by mazhar » Fri May 14, 2010 4:43 am

Seems there is some missing permission. Please have a look at following help topic http://help.ablecommerce.com/installati ... erce_7.htm and make sure application has all required permissions.

candland
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Thu May 13, 2010 11:11 am

Re: YSOD trying to edit email templates

Post by candland » Fri May 14, 2010 8:49 am

I did find that page and check everything, doesn't sound like I need full trust for email templates. I also uploaded and ran the TestPermissions.aspx and everything passed. Anything else I should check?

Test Write to ~App_Data: PASSED
Test Delete to ~App_Data: PASSED
Test Write to ~App_Themes: PASSED
Test Delete to ~App_Themes: PASSED
Test Write to ~Assets: PASSED
Test Delete to ~Assets: PASSED
Test Write to ~webcharts: PASSED
Test Delete to ~webcharts: PASSED

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: YSOD trying to edit email templates

Post by mazhar » Fri May 14, 2010 9:24 am

What is the current trust level of application? AbleCommerce minimum required level is Medium Trust with web Permission enabled.

candland
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Thu May 13, 2010 11:11 am

Re: YSOD trying to edit email templates

Post by candland » Fri May 14, 2010 10:50 am

Changed to full trust, which fixed it.

Thanks.

candland
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Thu May 13, 2010 11:11 am

Re: YSOD trying to edit email templates

Post by candland » Fri May 14, 2010 10:53 am

One last question, the email templates don't have any body text. Should they or does the site come without any pre-defined templates?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: YSOD trying to edit email templates

Post by mazhar » Fri May 14, 2010 11:12 am

No there are a number of pre defined Email templates. Make sure that you installed the product properly. If every thing went fine then it should show you a number of configured Email templates under Administration > Configure > Email > Templates.

candland
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Thu May 13, 2010 11:11 am

Re: YSOD trying to edit email templates

Post by candland » Fri May 14, 2010 11:47 am

Looks like the install didn't copy the templates to the app_data\emailtemplates\1\ directory for some reason. I copied from the install folder and that fixed it. Thanks for your help.

Post Reply