This is a migrated thread and some comments may be shown as answers.

radStyleSheetManager error

2 Answers 113 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Jeanne
Top achievements
Rank 1
Jeanne asked on 21 Oct 2012, 04:08 AM
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 Answers, 1 is accepted

Sort by
0
Jeanne
Top achievements
Rank 1
answered on 21 Oct 2012, 04:18 AM
Copying the two dll files into my /Bin directory fixed the problem, but it shouldn't have happened in the first place.
0
Dimitar Terziev
Telerik team
answered on 26 Oct 2012, 12:03 PM
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.
Tags
ScriptManager and StyleSheetManager
Asked by
Jeanne
Top achievements
Rank 1
Answers by
Jeanne
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or