During my time working with DotNetNuke, I have encountered innumerable forum posts in the following general form:
I’m getting a very vague general exception error, and I’m not sure what is causing it. There doesn’t seem to be anything visible in the application . . . [and] no errors as I’m navigating the site. Any and all help is greatly appreciated!
StackTrace: [NullReferenceException: Object reference not set to an instance of an object.]
DotNetNuke.UI.Skins.SkinDefaults..ctor(SkinDefaultType DefaultType) +189
DotNetNuke .Common.Globals.get_DefaultSkin() +31
DotNetNuke.Entities.Portals.PortalSettings.GetPortalSettings(Int32 TabId, PortalAliasInfo objPortalAliasInfo) +2797
DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabId, PortalAliasInfo objPortalAliasInfo) +82
DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +3303
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Experienced DNN developers will recognize the general area in which the error is occurring (missing skinningDefaults in DotNetNuke.config) and probably some general guidance to rectify the error (check that DotNetNuke.config exists, and correctly contains the proper skinningDefaults element).
This is fine for exceptions that occur frequently, but how does an experienced developer guide a novice in finding a solution to this issue?
[NullReferenceException: Object reference not set to an instance of an object.]
DotNetNuke.HttpModules.UrlRewriteModule.RewriteUrl(HttpApplication app) +378
DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +1180
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Even a sophisticated developer would need to explore several avenues in finding a solution. Assisting a relatively novice forum user in performing these tasks is problematic — such assistance would require a number of back-and-forth exchanges. With regret, I unfortunately observe many problems go unremedied for this reason (as, to date, is the exception posted immediately above). (more…)