2011-08-19 77 views
0

我想深入了解困扰了我一段时间的东西。如何地狱的一个人读这样的ASP.net错误消息:如何阅读asp.net错误消息

Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: The server tag is not well formed. ---> System.Web.HttpParseException: The server tag is not well formed. ---> System.Web.HttpException: The server tag is not well formed. at System.Web.UI.TemplateParser.ProcessError(String message) 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.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, 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.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---

这是DNN,但出现这种情况时间在其他.NET应用程序,如Sitefinity过,虽然我可以看到什么错误是,它不告诉我从哪里开始寻找。

谢谢:)

回答

1

这就是所谓的一个callstack。发生问题时,许多调试器或编程环境都会显示此信息。通常,你想要做的是从callstack的顶部开始,并确定哪些是“系统”调用,哪些调用更可能成为问题的根源。在这种情况下:

DotNetNuke.UI.ControlUtilities.LoadControl [T](TemplateControl一个ContainerControl,字符串ControlSrc)在DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl()

是对问题的最可能的来源。

8

实际例外情况在第一行。 'DotNetNuke.Services.Exceptions.ModuleLoadException'后跟异常消息。

文本的其余部分主要是堆栈跟踪。如果说抛出错误的方法是从几个地方调用的,并且你想知道哪一个,那么这很有用。你在跟踪中读的越远,你在呼叫链上得到的越高。所以TemplateParser.ProcessError被ParseStringInternal调用,ParseStringInternal被ParseString调用,依此类推。

现在的问题就在眼前,它说服务器标签的格式不正确。我没那么熟悉DNN,但该消息并异常名快速谷歌发现这样的: http://www.dotnetnuke.com/Resources/Blogs/EntryId/1496/The-server-tag-is-not-well-formed-oh-my.aspx

其中,在文章中不断移动的情况下,包含此解决方案:

This error is caused by an invalid characted located in the file called EditEntry.ascx. This character has an accent in it causing the crash. For full disclosure, this (now) invalid character has been in the code for quite a while, probably since its first public release.

Open DesktopModules\Blog\EditEntry.ascx Go to line 21 Look for the string matching "ResourcêKey " (notice the funky "e") Replace "ê" with "e" Save and upload This fix will get you up and running once again.

+0

谢谢你的快速反应的家伙,并就如何读什么,否则看起来像一块纸莎草的解释挖了字形,使没有意义的日常设计师:) 乔治,你的帖子关于博客是正确的,但这发生在我们的商店页面而不是博客上。但它确实给了我一个更好的开始! ;) 再次感谢! – SixfootJames

2

一好的技巧这篇文章在这里解释 -

Click link read full article

它讲述Global.asax文件更新到的行号。

void Application_Error(object sender, EventArgs e) 
{ 
    // Code that runs when an unhandled error occurs 
    Exception ex = Server.GetLastError(); 

    // get line number from ASPX parse error 
    System.Web.HttpParseException httpParseEx = ex as System.Web.HttpParseException; 

    if (httpParseEx != null) 
    { 
     String lineNumber = "Line number: " + httpParseEx.Line; 
    } 
} 
+1

我做到了这一点,它为我确定了有问题的路线。如果您不打算在每个application_error上使用此代码,那么也可以使用调试器。 – user420667