I have installed DNN 3.2.2, and I have written a C# custom module, and had it working last night? until I decided to use a different namespace for my code? to ensure no conflicts within the many DotNetNuke namespaces. Originally, I was using the DotNetNuke.Modules.SmartNews namespace. I changed the high level portion of the namespace to make it unique for my company.
After making the namespace change, my edit module is failing to load when attempting to edit the Module settings after having successfully inserted the module onto a web page. I see the following info in the log viewer.
ModuleId: -1
ModuleDefId: -1
FriendlyName:
ModuleControlSource:
AssemblyVersion: 03.02.02
Method: System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors
FileName:
FileLineNumber: 0
FileColumnNumber: 0
PortalID: 0
PortalName: My Website
UserID: 1
UserName: host
ActiveTabID: 36
ActiveTabName: Home
AbsoluteURL: /DotNetNuke/Default.aspx
AbsoluteURLReferrer: http://localhost/DotNetNuke/Home/tabid/36/Default.aspx
ExceptionGUID: 6e3a0c7d-cc92-4cd1-adbf-c6b347729afa
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
InnerException: External component has thrown an exception.
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: External component has thrown an exception. ---> System.Web.HttpException: External component has thrown an exception. ---> System.Web.HttpCompileException: External component has thrown an exception. at System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results, CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String sourceString) at System.Web.Compilation.BaseCompiler.GetCompiledType() at System.Web.Compilation.UserControlCompiler.CompileUserControlType(UserControlParser ucParser) at System.Web.UI.UserControlParser.CompileIntoType() at System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation() --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) at System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() at System.Web.UI.TemplateParser.GetParserCacheItem() at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControlParser.GetCompiledType(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.UserControlParser.GetCompiledUserControlType(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) in C:\DotNetNuke_3_2_2\admin\Skins\Skin.vb:line 466 --- End of inner exception stack trace ---
StackTrace:
Source:
Server Name: THINKPADT42
I have placed a breakpoint at C:\DotNetNuke_3_2_2\admin\Skins\Skin.vb:line 466 and I see that an exception is occurring at line 466?.which is the following statement?
objPortalModuleBase = CType(Me.LoadControl("~/" & objModule.ControlSrc), PortalModuleBase)
The LoadControl is being attempted for a ?ascx? user control?. and the ?ascx? file resides where it is expected to be.
The companion edit module inherits from DotNetNuke.Entities.Modules.PortalModuleBase, however I can not figure out why the exception is occurring. Both ?ascx? file and companion ?ascx.cs? file are where expected.
Please ? any suggestions ???? this is one of those problems which has consumed many hours.
Thanks