nopCommerce 1.80 under medium trust?

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

Just installed 1.80 on a live server running under Medium Trust.

Install went smoothly, but getting security excpetions each time I try to add/delete a category?

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 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_categorydetails_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Thanks!
13 years ago
I think I read in a post that from 1.50 onwards you need to have your host give you full trust. This is fine if you are happy getting stuck at 1.40 but clearly isn't ideal for the future. Most hosting companies do not give Full Trust on a shared plan and yes you can ask but they will usually refuse. There are some posts on here which advise that you change your host but no-one wants to do that if it can be avoided.
The question is can the latest version run in Medium trust "out of the box" and if it can't, is there a way to modify the code to allow it to, even if that means losing some features or functionality.

If this question could be answered once and for all, we would all know where we stand.
13 years ago
According to:

https://www.nopcommerce.com/technologysystemrequirements.aspx

Medium Trust should be supported:

Can be run in medium trust (except PDF and Excel related features)
13 years ago
I was having the same issues, got my ISP to change to Full Trust and it worked fine afterwards.

https://www.nopcommerce.com/boards/t/6044/new-18-install-errors.aspx
13 years ago
Unfortunately our live servers will not run in Full trust, for obvious reasons of course...
13 years ago
rudgr wrote:
According to:

https://www.nopcommerce.com/technologysystemrequirements.aspx

Medium Trust should be supported:

Can be run in medium trust (except PDF and Excel related features)


Has anyone found a solution to this problem?
13 years ago
Ok so after do some research on the asp.net forums I came up with a small fix for this error if your hosting package wont support "Full Trust"

Basically I downloaded another text editor from "ckeditor.com" and replaced the nopcommerce text editor which used the ajaxtoolkit one. This then allows you to work on a medium trust server and the problem is solved.
13 years ago
Thanks, I'll give it a try...
13 years ago
After much thought I came to the following conclusions.

1. It is the HTML editor that is the cause of the problem, earlier versions of nopCommerce used fckeditor. It is possible to convert the later versions but that's a lot of code to change and then every time there is a new version released, you have to do it all again.

2. You can ask your shared hosting provider to give you "Full Trust" but for them to do that they will have to have configured their servers in that manner in the first place. If they haven't (and most them haven't because they follow a setup recommended by microsoft), they will say no.

3. You can stick with nop version 1.40 forever. This is fine except that you miss out on all future upgrades.

4. You find another host.

When you see it all written down, the obvious answer is the last one but no-one wants to run to that expense since they already pay for hosting. I tried Arvixe (Personal Class ASP) after seeing the recommendation by nopcommerce. You can sign up for one month! It cost $8 and you get a free domain name. The process is painless and you can pay by Paypal. After that you can install nopcommerce and off you go. Sign up for two years hosting and the cost drops to $5 and the domain is free for life.

Customer support is fast and they have a live chat facility. MSSQL is 2008 but it is the express version and it has a limit of 3GB. They have other plans available and I'm sure that there are other companies out there that can do the same.
13 years ago
tavis1zn wrote:
Ok so after do some research on the asp.net forums I came up with a small fix for this error if your hosting package wont support "Full Trust"

Basically I downloaded another text editor from "ckeditor.com" and replaced the nopcommerce text editor which used the ajaxtoolkit one. This then allows you to work on a medium trust server and the problem is solved.


Thanks tavis1zn, I replaced the editor with another and it seems to work fine. Still I hope the bug will be fixed in either nopCommerce/AJAXControlToolkit.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.