1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Exception in sitefinity admin in shared hosting environment

Exception in sitefinity admin in shared hosting environment

11 posts, 0 answered
  1. Nitin
    Nitin avatar
    51 posts
    Registered:
    14 Aug 2007
    09 Oct 2007
    Link to this post

    Hi.

    First of all, let me clarify that I don't like to use the word "Exception" much, despite what a few of my last post titles might suggest :)

    Ok, I get the following exception very often in our production environment:

     

    Server Error in '/ThinkwiseCms' Application.

     

    Attempt to access the method failed.

    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.MethodAccessException: Attempt to access the method 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:

    [MethodAccessException: Attempt to access the method failed.]
       System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
       System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
       System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +261
       System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
       System.Web.UI.TemplateControl.LoadControl(IWebObjectFactory objectFactory, VirtualPath virtualPath, Type t, Object[] parameters) +305
       System.Web.UI.TemplateControl.LoadControl(Type t, Object[] parameters) +13
       Telerik.Cms.Web.UI.PropertyEditorDialog.GetEditor() +172
       Telerik.Cms.Web.UI.PropertyEditorDialog.CreateChildControls() +155
       System.Web.UI.Control.EnsureChildControls() +87
       Telerik.Cms.Web.UI.PropertyView.picker_Command(Object sender, CommandEventArgs e) +284
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +105
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +163
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832



    It appears that every time we try to activate Blog selector, Image selector or any other editor, this exception is thrown.

    Is it a hosting issue? Has anyone else seen this behavior?

    nG
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    09 Oct 2007
    Link to this post
    Hello Nitin,

    Thanks a lot for pointing out this issue. We reproduced the described behavior only for the selectors in PostsList and PollBox controls. We will investigate the problem.

    There is a solution for this. However, you’ll need the help of your shared web hosting company to modify the default medium trust configuration file (web_mediumtrust.config), located in Windows\Microsoft.NET\Framework\v2.0.****\CONFIG directory. The solution is to turn on ReflectionPermission. Following are steps to achieve this:

    1. Add the following into SecurityClasses section:

    <SecurityClass Name="ReflectionPermission" Description="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b77a5c561934e089"/> 

    2. Add the following into PermissionSet section named ASP.Net:

    <IPermission  
          class="ReflectionPermission" 
          version="1" 
          Unrestricted="true" /> 
     

    For more information you, could investigate the following article:
    http://west-wind.com/WebLog/posts/6344.aspx

    As a note of gratitude your Telerik points have been updated.

    Sincerely yours,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Nitin
    Nitin avatar
    51 posts
    Registered:
    14 Aug 2007
    10 Oct 2007
    Link to this post
    Pepi,

    Thanks for your help!

    I might as well point out that the issue is not limited to Post Lists and  Poll Box only. All of the properties decorated with 

    [WebEditor("Telerik.Cms.Web.UI.UrlEditorWrapper, Telerik.Cms")]

    attribute in our user controls throw the same exception....

    I will see what GoDaddy has to say about making suggested changes...

    nG
  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    10 Oct 2007
    Link to this post
    Hi Nitin,

    Thanks a lot for the additional information. Definitely it will help us localize the problem because we already have a starting point. We will start with investigating the implementation of UrlEditorWrapper class that obviously causes this behavior.

    Best wishes,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    10 Oct 2007
    Link to this post
    Nitin -

    I am eager to hear the response from GoDaddy as well. Generally, they seemed pretty strict. Can you post an update when you get a response from them.

    Sincerely,

    Ben
  6. Nitin
    Nitin avatar
    51 posts
    Registered:
    14 Aug 2007
    12 Oct 2007
    Link to this post

    Bnye,

    Here is GoDaddy's reply:

    -------------------------------------------------------------------------------------
    Thank you for contacting Online Support. Unfortunately, it does not look as if you will be able to make the changes stated in your email you sent us. We cannot change the security level or edit the security files for you on any of our Windows Shared Hosting Plans. We apologize for the convenience.

    Please let us know if we can help you in any other way.
    -------------------------------------------------------------------------------------

    It looks like they are not going to update the settings I requested, per Pepi's post. I sort of anticipated it.............

    nG
  7. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    12 Oct 2007
    Link to this post
    I liked GoDaddy's "We apologize for the convenience" response.   :)   (Yes, I know it's a typo.)

    I did a quick test of the Image & Blog WebEditors on DiscountASP.Net and they seem to work fine. 

    Gabe
    =====================
  8. Nitin
    Nitin avatar
    51 posts
    Registered:
    14 Aug 2007
    12 Oct 2007
    Link to this post
    Gabe,

    Thanks for the tip. I have been looking at alternatives and DiscountAsp is in our list for a possible host.

    For a CMS site, GoDaddy's shared hosting environment is way too restrictive!

    nG
  9. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    12 Oct 2007
    Link to this post
    I think I have mentioned this before, but we have 7 3.0 SP2 sites with Webhost4life and they have been very flexible. If you request a change to the server. In most cased they will do it.

    The only downside I have found is the application pool. We have had to purchase what they call a "scheduled task" for each of our clients to get around the application pool going idle. Luckily its only $20 a year for 5 scheduled tasks. Essentially it pings your site to keep the application pool alive. Support responses are usually within one hour and the people are reasonably knowledgable IT server guys.

    I don't have anyone hosting with discount asp. However, they look like they will be early adopters of IIS7. From what I hear this will automatically GZIP themes, making for large performance gains. Currently only individually requested .css files are gzipped in IIS6.

    Sincerely,

    Ben
  10. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    13 Nov 2007
    Link to this post
    Am  I correct to assume that this has been fixed in 3.1 SP1 so now it will work with GoDaddy's strict medium trust?

    Sincerely,

    Ben
  11. Nitin
    Nitin avatar
    51 posts
    Registered:
    14 Aug 2007
    13 Nov 2007
    Link to this post
    Ben,

    I have not tested v3.1 in GoDaddy shared hosting environment. In fact, we ended up moving our website to Webhost4life and its working great there!

    -nG
Register for webinar
11 posts, 0 answered