RadScriptManager Error

7 posts, 2 answers
  1. Robert
    Robert avatar
    19 posts
    Member since:
    Feb 2009

    Posted 12 May 2009 Link to this post

    I placed a RadScriptManager control in the Masterpage of my Sharepoint site. Here is the relevant code:

    <telerik:RadScriptManager Runat=server id="RadScriptManager1"
        <Scripts> 
            <asp:ScriptReference name=""Assembly=""Path="~/Scripts/jquery.getParams.js"
            <asp:ScriptReference name=""Assembly=""Path="~/Scripts/jquery-ui-1.7.1.custom.min.js">   
        </Scripts> 
    </telerik:RadScriptManager> 
     




    I am following examples set here and here.
    However this generates the following error:
    Literal content ('<asp:ScriptReference name=""Assembly=""Path="~/Scripts/jquery.getParams.js">
    <asp:ScriptReference name=""Assembly=""Path="~/Scripts/jquery-ui-1.7.1.custom.min.js">') is not allowed within a 'System.Web.UI.ScriptReferenceCollection'.


    I am not sure what this is.

  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 13 May 2009 Link to this post

    Hello Robert,

    I suggest the following:
    1. Remove the empty Name and Assembly attributes so the declaration looks like this:
      <telerik:RadScriptManager Runat=server id="RadScriptManager1">
          <Scripts>
              <asp:ScriptReference Path="~/Scripts/jquery.getParams.js" />
              <asp:ScriptReference Path="~/Scripts/jquery-ui-1.7.1.custom.min.js" />  
          </Scripts>
      </telerik:RadScriptManager>
      It seems that for some reason the ScriptReference tag is not closed in our documentation. I will make sure we fix this ASAP.
    2. Make sure the following line is present in your web.config:
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    I have updated your telerik points for spotting the problem in our documentation.

    I hope this helps,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  3. Robert
    Robert avatar
    19 posts
    Member since:
    Feb 2009

    Posted 13 May 2009 Link to this post

    I have made all the changes you suggested and am getting the following error:

    System.NullReferenceException: Object reference not set to an instance of an object.

    If I remove the RadScriptManager tag and replace it with a standard asp.net ajax ScriptManager my page loads fine. But I need the RadScriptManager in order to do what I need.




  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 13 May 2009 Link to this post

    Hi Robert,

    Could you please provide the full stack trace?

    Kind regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Robert
    Robert avatar
    19 posts
    Member since:
    Feb 2009

    Posted 13 May 2009 Link to this post

    Let me know if you need more.


    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       Telerik.Web.UI.WebResource.Exists(HttpContext context, String path, String applicationPath) +878
       Telerik.Web.UI.RadScriptManager.OnPreRender(EventArgs e) +86
       System.Web.UI.Control.PreRenderRecursiveInternal() +80
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    

  6. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 13 May 2009 Link to this post

    Hello Robert,

    For some reason the HTTP handler detection code fails in your setup. You can try setting the EnableHandlerDetection property of RadScriptManager to false. Additionally please make sure that you have included the assembly version when registering the HTTP handler in MOSS as explained in this help topic.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Robert
    Robert avatar
    19 posts
    Member since:
    Feb 2009

    Posted 13 May 2009 Link to this post

    Hi Albert.

    That was the problem. I followed the HTTP handler instructions in the original documentation page which is different from the one you just sent. That original page is pretty messed up.

    It's all working now. Thanks for your help!

Back to Top