类型 (System.Web.UI.WebControls.Label) 与控件类型 (ASP.controls_labelcontrol_ascx) 不兼容
type (System.Web.UI.WebControls.Label) is not compatible with the type of control (ASP.controls_labelcontrol_ascx)
以下问题与 DotNetNuke 相关 - 但在我看来是一个 asp.net 相关错误,我非常感谢解决此问题的每一个提示。
我有以下问题:在我的开发环境(Win 8.1、SqlServer 2008 R2 express、VS2013)中全新安装 DotNetNuke 7.4.2 后编辑 Html 模块的内容时显示异常最后加注。在测试环境(Win 2K8 server 64bit,SqlServer 2008 R2 express)安装7.4.2时编辑模块没有报错,一切正常。
安装是使用空数据库完成的,修改 web.config 以指向该数据库并调用 http://dnndev.me/install/install.aspx。该网站有自己的应用程序池,应用程序池用户已被授予对安装文件夹的必要权限。顺便说一句:从 DNN v4 开始,此程序已成功使用(经过修改)。
A google 搜索没有显示太多结果。我尝试清除 "v4.0.30319\Temporary ASP.NET Files" 文件夹 - 没有成功。
有谁知道这个错误的原因是什么?
谢谢你的想法,
罗伯特
Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException:
The base class includes the field 'plCurrentWorkVersion', but its type (System.Web.UI.WebControls.Label)
is not compatible with the type of control (ASP.controls_labelcontrol_ascx).
---> System.Web.HttpParseException: The base class includes the field 'plCurrentWorkVersion',
but its type (System.Web.UI.WebControls.Label) is not compatible with the type of control (ASP.controls_labelcontrol_ascx).
---> System.Web.HttpParseException: The base class includes the field 'plCurrentWorkVersion', but its type (System.Web.UI.WebControls.Label)
is not compatible with the type of control (ASP.controls_labelcontrol_ascx).
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
at System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
at System.Web.Compilation.BaseCodeDomTreeGenerator.GetCodeDomTree(CodeDomProvider codeDomProvider, StringResourceBuilder stringResourceBuilder, VirtualPath virtualPath)
at System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder)
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
--- End of inner exception stack trace ---
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc)
at DotNetNuke.UI.Modules.ModuleControlFactory.LoadModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration)
at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl()
--- End of inner exception stack trace ---
相关的标记代码是
<asp:Label id="plCurrentWorkVersion" runat="server" text="Version" ResourceKey="plCurrentWorkVersion" />
站点 dnndev.me(及其应用程序)之前曾用于其他安装。
删除并重新创建站点(暗示应用程序)解决了错误(请注意,创建新的应用程序池是不够的)。
如果对此有解释,我将不胜感激。
编辑:将当前 applicationHost.config 与旧版本进行比较显示了错误的原因:有一个额外的条目指向其他旧版本中路径的完全限定名称。这导致了使用两个版本的编译(这是 Panagiotis 已经写的)。
如果您已经删除了该网站,那么现在检查可能为时已晚,但我会检查该网站下是否有 DesktopModules 上的 Application/VirtualDirectory,或中的任何子文件夹那里。这是我在 Visual Studio 中的模板的一个常见问题,出于某种原因,VS 会随机地将这些文件夹变成一个单独的应用程序,这会导致各种混乱,直到您在 IIS 中删除该应用程序。
以下问题与 DotNetNuke 相关 - 但在我看来是一个 asp.net 相关错误,我非常感谢解决此问题的每一个提示。
我有以下问题:在我的开发环境(Win 8.1、SqlServer 2008 R2 express、VS2013)中全新安装 DotNetNuke 7.4.2 后编辑 Html 模块的内容时显示异常最后加注。在测试环境(Win 2K8 server 64bit,SqlServer 2008 R2 express)安装7.4.2时编辑模块没有报错,一切正常。
安装是使用空数据库完成的,修改 web.config 以指向该数据库并调用 http://dnndev.me/install/install.aspx。该网站有自己的应用程序池,应用程序池用户已被授予对安装文件夹的必要权限。顺便说一句:从 DNN v4 开始,此程序已成功使用(经过修改)。
A google 搜索没有显示太多结果。我尝试清除 "v4.0.30319\Temporary ASP.NET Files" 文件夹 - 没有成功。
有谁知道这个错误的原因是什么?
谢谢你的想法, 罗伯特
Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException:
The base class includes the field 'plCurrentWorkVersion', but its type (System.Web.UI.WebControls.Label)
is not compatible with the type of control (ASP.controls_labelcontrol_ascx).
---> System.Web.HttpParseException: The base class includes the field 'plCurrentWorkVersion',
but its type (System.Web.UI.WebControls.Label) is not compatible with the type of control (ASP.controls_labelcontrol_ascx).
---> System.Web.HttpParseException: The base class includes the field 'plCurrentWorkVersion', but its type (System.Web.UI.WebControls.Label)
is not compatible with the type of control (ASP.controls_labelcontrol_ascx).
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
at System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
at System.Web.Compilation.BaseCodeDomTreeGenerator.GetCodeDomTree(CodeDomProvider codeDomProvider, StringResourceBuilder stringResourceBuilder, VirtualPath virtualPath)
at System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder)
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
--- End of inner exception stack trace ---
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc)
at DotNetNuke.UI.Modules.ModuleControlFactory.LoadModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration)
at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl()
--- End of inner exception stack trace ---
相关的标记代码是
<asp:Label id="plCurrentWorkVersion" runat="server" text="Version" ResourceKey="plCurrentWorkVersion" />
站点 dnndev.me(及其应用程序)之前曾用于其他安装。
删除并重新创建站点(暗示应用程序)解决了错误(请注意,创建新的应用程序池是不够的)。
如果对此有解释,我将不胜感激。
编辑:将当前 applicationHost.config 与旧版本进行比较显示了错误的原因:有一个额外的条目指向其他旧版本中路径的完全限定名称。这导致了使用两个版本的编译(这是 Panagiotis 已经写的)。
如果您已经删除了该网站,那么现在检查可能为时已晚,但我会检查该网站下是否有 DesktopModules 上的 Application/VirtualDirectory,或中的任何子文件夹那里。这是我在 Visual Studio 中的模板的一个常见问题,出于某种原因,VS 会随机地将这些文件夹变成一个单独的应用程序,这会导致各种混乱,直到您在 IIS 中删除该应用程序。