今天DotNetNuke建立的网站的永日模块有部份功能不能运行,提示“Runat 属性必须具有值 Server"
引起这个错误的原因是因为8月份最新的一个Windows系统升级程序,解决的办法如下:
把 /controls/TextEditor.ascx 第9行 id = ”celTextEditor” Runat=”Server” 修改为 id = "celTextEditor" Runat="Server"
请注意,这两行看起来是一样的,其实原始代码中,"celTextEditor"和"Server"这两个单词前面都有一个空格,也正是这个空格引起报错。在中文系统中,TextEditro.ascx文件打开可能是这样的
这应该是因为编码问题引起的,不要管它,直接修改为正确的英文。
下面是出错信息的全文:
InnerException: The Runat attribute must have the value Server.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.UI.TemplateParser.ProcessError
StackTrace:
Message:
DotNetNuke.Services.Exceptions.ModuleLoadException: The Runat attribute
must have the value Server. ---> System.Exception: The Runat
attribute must have the value Server. --->
System.Web.HttpParseException: The Runat attribute must have the value
Server. ---> System.Exception: The Runat attribute must have the
value Server. ---> System.Web.HttpException: The Runat attribute
must have the value Server. at
System.Web.UI.TemplateParser.ProcessError(String message) at
System.Web.UI.TemplateParser.ProcessAttributes(Match match,
ParsedAttributeCollection& attribs, Boolean fDirective, String&
duplicateAttribute) at
System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String
inputText) at System.Web.UI.TemplateParser.ParseStringInternal(String
text, Encoding fileEncoding) --- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ProcessException(Exception ex) at
System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding
fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text,
VirtualPath virtualPath, Encoding fileEncoding) --- End of inner
exception stack trace --- at
System.Web.UI.TemplateParser.ParseString(String text, VirtualPath
virtualPath, Encoding fileEncoding) at
System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath
virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at
System.Web.UI.TemplateParser.Parse() at
System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at
System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(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) at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean
allowCrossApp, Boolean allowBuildInPrecompile) at
System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath
virtualPath, Boolean allowNoCompile) at
System.Web.UI.BaseTemplateParser.GetUserControlType(VirtualPath
virtualPath) at
System.Web.UI.MainTagNameToTypeMapper.ProcessUserControlRegistration(UserControlRegisterEntry
ucRegisterEntry) at
System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName,
IDictionary directive) at
System.Web.UI.TemplateControlParser.ProcessDirective(String
directiveName, IDictionary directive) at
System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding
fileEncoding) --- End of inner exception stack trace --- at
System.Web.UI.TemplateParser.ProcessException(Exception ex) at
System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding
fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text,
VirtualPath virtualPath, Encoding fileEncoding) at
System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath
virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at
System.Web.UI.TemplateParser.Parse() at
System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at
System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(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) at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean
allowCrossApp, Boolean allowBuildInPrecompile) at
System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at
System.Web.UI.TemplateControl.LoadControl(String virtualPath) at
DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo
objModule, PortalSettings PortalSettings) --- End of inner exception
stack trace ---