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

Forums / Developing with Sitefinity / Custom Module not working

Custom Module not working

4 posts, 0 answered
  1. Vincent
    Vincent avatar
    13 posts
    Registered:
    13 Jul 2008
    10 Mar 2010
    Link to this post
    Hi

    I just deploy my custom module to my website, but it seems not working. I can run it on my local machine, so I am sure code is working fine. Can someone give me a help? By the way, I am using godaddy shared hosting.

    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:

    Line 13:         protected override void CreateViews()
    Line 14:         {
    Line 15:             AddView("ItemListView", "~/Modules/Products/Views/Backend/ItemListView.ascx", "Products", string.Empty, string.Empty, null);
    Line 16:             AddView("ItemNewView", "~/Modules/Products/Views/Backend/ItemNewView.ascx", "Add new product", string.Empty, string.Empty, null);
    Line 17:             AddView("ItemEditView", "~/Modules/Products/Views/Backend/ItemEditView.ascx", "Edit product", string.Empty, string.Empty, null);

    Source File: d:\hosting\5750272\html\App_Code\Products\ContactItemsView.cs Line: 15 
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    10 Mar 2010
    Link to this post
    Hi Vincent,

    The application attempted to perform an operation not allowed by the security policy.
    - the trust level that your host has set does not allow to "add views". There is some additional permission that they  have set which stops the request and permission error is thrown. Try to compile the module in a dll instead of working with App_Code folder. If this does not help you need to switch your host plan or host server.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Vincent
    Vincent avatar
    13 posts
    Registered:
    13 Jul 2008
    11 Mar 2010
    Link to this post
    Hi

    I following your instruction to remove the cs file from app_code and compile them into a single dll, it seems I can pass this error. But I got another errors

    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:

    Line 54: 			{
    Line 55: 				Telerik.Web.IControlPanel ctrlPnl = (Telerik.Web.IControlPanel)this.contolPanel;
    Line 56: foreach (Telerik.Web.ICommandPanel cmdPnl in ctrlPnl.CommandPanels)Line 57: 					this.ToolBoxHolder.Controls.Add((Control)cmdPnl);
    Line 58: 			}

    Source File: d:\hosting\5750272\html\Sitefinity\Admin\Modules.aspx.cs    Line: 56

    Stack



    Can you tell give some suggestion?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Mar 2010
    Link to this post
    Hi Vincent,

    The problem comes form the host security policy and there is nothing that we could suggest in this case regarding the code. You need to upgrade your plan or switch the provider.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
4 posts, 0 answered