While working on a clients DotNetNuke install trying to get the mail server working correctly. I tried to access the host settings for the web portal framework and came up with the following:
1: Error: Host Settings is currently unavailable.
2: DotNetNuke.Services.Exceptions.ModuleLoadException:
3: D:\admin\Host\FriendlyUrls.ascx.vb(44): error BC30560: 'RewriterRuleCollection' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'. --->
4: System.Exception: D:\admin\Host\FriendlyUrls.ascx.vb(44):
5: error BC30560: 'RewriterRuleCollection' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'. --->
6: System.Web.HttpCompileException: D:\admin\Host\FriendlyUrls.ascx.vb(44):
7: error BC30560: 'RewriterRuleCollection' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
8: at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
9: at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)
10: at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)
11: at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
12: at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
13: at System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile)
14: at System.Web.UI.BaseTemplateParser.GetUserControlType(VirtualPath virtualPath)
15: at System.Web.UI.MainTagNameToTypeMapper.ProcessUserControlRegistration(UserControlRegisterEntry ucRegisterEntry)
16: at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
17: at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
18: at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
19: --- End of inner exception stack trace ---
20: at System.Web.UI.TemplateParser.ProcessException(Exception ex)
21: at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
22: at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
23: at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
24: at System.Web.UI.TemplateParser.ParseInternal()
25: at System.Web.UI.TemplateParser.Parse()
26: at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
27: at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
28: at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
29: at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
30: at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
31: at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
32: at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
33: at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
34: at System.Web.UI.TemplateControl.LoadControl(String virtualPath)
35: at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings)
36: --- End of inner exception stack trace ---
This did not bode well for trying to access any of the mail settings or anything else for that matter that was controlled through the Host Settings. So off to Google I went to try and discover what could be causing our issue.
Upon searching I found a forum post on DotNetNuke that sounded very close to what was causing my issue. On the third page of the thread Rija RABETOKOTANY RAOBIVELO provided just the answer I was looking for:
Don't know if this is still needed but I post it anyway.
I got the same problem and found that the DotNetNuke.HttpModules.dll replaces all other dll in the same namespace including DotNetNuke.HttpModules.UrlRewriter.dll since 4.6.0. So in my case these two files exist in the bin directory of my 4.5.3 install. Surely that an upgrade attempt was made so the new assembly copies the DotNetNuke.HttpModules.dll into the bin directory and it co-exists then with DotNetNuke.HttpModules.UrlRewriter.dll
So you can delete the DotNetNuke.HttpModules.dll file from your bin directory if you're still in 4.5.* but delete DotNetNuke.HttpModules.* if you're in 4.6.*
That fixes my issue
Hope it will help
When I looked at his answer I then went and checked the properties of the DotNetNuke.dll file in my bin folder which let me know that the site was currently using version 4.5.3 of the platform. I then looked through the bin folder and found that I indeed had both the DotNetNuke.HttpModules.dll and the DotNetNuke.HttpModules.UrlRewriter.dll file in my bin folder. So this was giving me my error message from before. To verify this I checked the properties of the DotNetNuke.HttpModules.dll and found that it was attached to version 4.6.2 so at some point someone tried to do an upgrade to the portal framework that didn’t take and caused us the small grief.
Once the file was removed, the host settings came up just like there were supposed to and it has been working great every since. Hope this helps anyone else that runs into this issue with DNN.
Technorati Tags:
DotNetNuke,
Software