We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Theme issue when deploying MVC project

I'm having a problem when I deploy my project to an IIS server.  It runs fine on the local host development server; I'm assuming I am missing a file when I deploy that isn't making it into the deployment package.

The offending line in the Site.Master template is:
<%=Html.Syncfusion().Menu("syncmenu").Height(30).OpenOnClick(true).AutoFormat(Skins.Sandune)%>

It throws an NullReferenceException.  The stack trace shows:
[NullReferenceException: Object reference not set to an instance of an object.]
   Syncfusion.Mvc.Shared.<>c__DisplayClass25.<GetResourceUrl>b__22(EmbeddedResource resource) +31
   Syncfusion.Linq.FunctionalExtensions.ForEach(IEnumerable`1 items, Action`1 action) +150
   Syncfusion.Mvc.Shared.CompositeResource.GetResourceUrl(ResourceType resourceType) +128
   Syncfusion.Mvc.Shared.MvcStaticResourceManager.GetCSSResourceUrl(List`1 resourceCollection, List`1 customCollection) +578
   Syncfusion.Mvc.Shared.MvcStaticResourceManager.GetCssCode() +131
   Syncfusion.Mvc.Tools.Menu.RenderStyleSheet() +41
   Syncfusion.Mvc.Tools.Menu.RegisterResource() +2299
   Syncfusion.Mvc.Tools.Menu.RenderControl() +636
   Syncfusion.Mvc.Tools.MenuBuilder.Render() +224
   Syncfusion.Mvc.Tools.MenuBuilder.ToString() +8
   System.Web.HttpWriter.Write(Object obj) +38
   ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\MvcGoldmineAccountManager\Views\Shared\Site.Master:118
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +64
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5289

Can anyone tell me what file I'm missing?  All of the assemblies and their associated XML files are in the bin directory on the web server.

1 Reply

ME Meena Syncfusion Team February 22, 2013 06:16 AM UTC

Hi Dan,

 

Thanks for contacting Syncfusion forums.

 

The reported issue may occur due to the unavailability of Theme.Base assembly reference in your application. We had introduced a new assembly called “Syncfusion.Theme.Base”  in our Volume 3, 2012 release (v10.3.0.43) for rich theming support. We need to refer that assembly in web.config and application reference as well, while hosting the application to server. Whereas while running the application from local, it will load the Theme.Base assembly from GAC directly (if it is in GAC). If it is not in GAC, we need to refer it manually from BIN directory or any other local directorty.

 

Please refer the below code snippet,

 

<code>

[Web.Config]

     <add assembly="Syncfusion.Theme.Base, Version=10.404.0.71, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/>            //replace the version based on your Essential studio version

 </code>

 

Kindly try the above suggestion and let us know if it helps.

 

Regards,

Meena


Loader.
Live Chat Icon For mobile
Up arrow icon