radStyleSheetManager error

3 posts, 0 answers
  1. Jeanne
    Jeanne avatar
    58 posts
    Member since:
    Sep 2011

    Posted 20 Oct 2012 Link to this post

    I've got a radEditor in a form template of a radGrid editor. I had a problem with the size of the radEditor when it displays the first time, so on the advice of another forum post I added the following to my master page.
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server">
        <StyleSheets>
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css" />
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" />
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css" />
        </StyleSheets>
    </telerik:RadStyleSheetManager>

    This worked fine on my desktop at work, but on my laptap I get the following error:
     

    Server Error in '/Workforce' Application.

    Object reference not set to an instance of an object.

    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.NullReferenceException: Object reference not set to an instance of an object.

    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:

    [NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.RadStyleSheetManager.GetIsValidScriptEntry(ScriptEntry scriptEntry) +20 Telerik.Web.UI.RadStyleSheetManager.RegisterValidStyleSheets(IList`1 styleSheets) +112 Telerik.Web.UI.RadStyleSheetManager.Page_PreRenderComplete(Object sender, EventArgs e) +114 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +9010682 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2716 


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

    Work computer is currently on Q2 2012 version and laptop is on Q3 2013. The only other difference I can find is that at work the referenced dlls are in my projects /Bin folder, and at home they are referenced from the GAC. Is there a problem with the StyleSheetManager finding dlls that are in the GAC?
  2. Jeanne
    Jeanne avatar
    58 posts
    Member since:
    Sep 2011

    Posted 20 Oct 2012 Link to this post

    Copying the two dll files into my /Bin directory fixed the problem, but it shouldn't have happened in the first place.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 26 Oct 2012 Link to this post

    Hi Jeanne,

    In general when an assembly is being referenced from the Global Assembly Cache its fully qualified name should be used.

    All the best,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top