More in this section

Forums / Developing with Sitefinity / Custom Module Could not resolve type for tag "sf:MessageControl"

Custom Module Could not resolve type for tag "sf:MessageControl"

11 posts, 0 answered
  1. OakTree Digital
    OakTree Digital avatar
    27 posts
    Registered:
    06 Sep 2012
    10 Jun 2010
    Link to this post
    We have a custom generic-content-based module we've created for a Sitefinity 3.7 SP3 site. Like all the generic-content-based modules we've created, we use embedded templates that closely resemble those for Sitefinity's modules for creating and editing content items. For some reason, in one of our modules, when editing a content item we get the following error message:

    Could not resolve type for tag "sf:MessageControl". Make sure the proper namespace is registered

    We have, however registered the namespace with the following markup at the top of the control template:

    <%@ Register TagPrefix="sfLib" Namespace="Telerik.Libraries.WebControls" Assembly="Telerik.Libraries" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Engine.WebControls" Assembly="Telerik.Cms.Engine" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Engine.WebControls.Admin" Assembly="Telerik.Cms.Engine" %>

    Furthermore, we use this control on our New Item embedded template, and have no trouble at all.

    Here's the really weird thing: If we recycle the app pool on the server, the error disappears for a period of time, eventually returning.

    I have tried re-compiling the source for our module, re-adding the sitefinity reference, but nothing seems to help. I am perplexed.

    Any help is appreciated!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Jun 2010
    Link to this post
    Hello Stuart Peschka,

    Message control is located under

    Assembly:   Telerik.Cms.Web.UI
    Namespace: Telerik.Cms.Web.UI
    Name:   Telerik.Cms.Web.UI.MessageControl

    As far as I see it you do not have reference to Telerik.Cms.Web.UI assembly.

    By default there should be a line in the web config - under <pages> node which registers Telerik.Cms.Web.UI with tag prefix - "telerik" that you can use directly

    <add tagPrefix="telerik" namespace="Telerik.Cms.Web.UI" assembly="Telerik.Cms.Web.UI" />

    sample

    <telerik:MessageControl runat="server" ID="message1">
            <ItemTemplate>
                <asp:Label runat="server" ID="messageText"></asp:Label>
            </ItemTemplate>
        </telerik:MessageControl>



    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.
  3. OakTree Digital
    OakTree Digital avatar
    27 posts
    Registered:
    06 Sep 2012
    15 Jun 2010
    Link to this post
    Hi Ivan,

    I removed the redundant register tag for Telerik.Cms.Web.UI from the template, built the app, and ran locally, and it was fine. I deployed the module dll to our live server, and it worked for awhile, then today it suddenly started giving us the same error:

    Could not resolve type for tag "sf:MessageControl". Make sure the proper namespace is registered.


    As with before, if I recycle the app pool, it starts working again. Any idea why this might be happening?

  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    17 Jun 2010
    Link to this post
    Hi Stuart Peschka,

    Thank you for contacting Telerik Support.

    Make sure that you application pool has enough memory to load the dependent assemblies. Probably you would need to set a memory limit for the application pool which when reached will recycle the pool. Before you do that however you can try to extract your Sitefinity website in its own application pool, not shared with other applications.

    Regards,
    Radoslav Georgiev
    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
  5. OakTree Digital
    OakTree Digital avatar
    27 posts
    Registered:
    06 Sep 2012
    18 Jun 2010
    Link to this post
    Our problematic Sitefinity site has been on its own application pool all along. I can set the maximum virtual and used memory the App pool uses. Do you have any suggetsions for amounts? The server itself has 4GB of RAM.

    The odd thing about this is that we don't have any trouble with this site on our staging server, nor do we have any problems with any other Sitefinity sites (with similar custom modules) running on our production server.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    21 Jun 2010
    Link to this post
    Hi Stuart Peschka,

    The problem could not be related to the memory if you have 4 gigs of RAM. The error could be thrown only if the assembly references are not correct or the Telerik.Cms.Web.UI is not presented in the bin.

    Sincerely yours,
    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
  7. OakTree Digital
    OakTree Digital avatar
    27 posts
    Registered:
    06 Sep 2012
    21 Jun 2010
    Link to this post
    That is what's so odd about the problem. There's no question that the assembly is being referenced and thatTelerik.Cms.Web.UI is in the bin directory. The rest of the module, nor any of Telerik's modules could work if this weren't the case. Furthermore, this particular template works for awhile, then suddenly gives the error.

    Any one have any other ideas?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    21 Jun 2010
    Link to this post
    Hello Stuart Peschka,

    If you can send a sample project that illustrates the issue I could  see what the problem is.

    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
  9. OakTree Digital
    OakTree Digital avatar
    27 posts
    Registered:
    06 Sep 2012
    21 Jun 2010
    Link to this post
    Yes, I can send you the project, although I'm unable to reproduce the issue myself on my dev environment, or on our staging server. This problem only occurs in our live environment a few hours after the application pool has been recycled.

    What would be the best way to deliver the project to you Ivan?

    Thanks!
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    21 Jun 2010
    Link to this post
    Hello Stuart Peschka,

    1. Check the error log for any relevant errors that are thrown at the same time. There could be several errors thrown before  "Could not resolve type for tag "sf:MessageControl". Make sure the proper namespace is registered". that cause the issue.

    2. You could send a sample project and the log fine using our support system. The attachment is limited to 20 mb which should be enough for a sample project. If the size of the project is bigger than 20 mb you could provide me with an external link from where I could download the project. The third option is FTP 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
  11. OakTree Digital
    OakTree Digital avatar
    27 posts
    Registered:
    06 Sep 2012
    28 Jun 2010
    Link to this post
    I eventually gave up on trying to figure this out and removed the telerik:MessageControl control altogether, which has fixed the problem.
Register for webinar
11 posts, 0 answered