DNN调试利器DNNDebug.aspx--如何调试出错信息不具体的程序错误

有些时候DNN中程序出错的提示没有指出具体的出错位置,如果使用断点跟踪也不知在何处插入断点,这样我们debug完全只能靠猜测,比如如下的出错提示:

Error: Edit Content is currently unavailable.
 DotNetNuke.Services.Exceptions.ModuleLoadException: 
 External component has thrown an exception. ---> System.Web.HttpCompileException: External component has thrown an exception. 
 at System.Web.Compilation.AssemblyBuilder.Compile() 
 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) in 
 E:\Development\DotNetNuke\InstallArea\DotNetNuke_04.08.03_Source\Library\Components\Skins\Skin.vb:line 492 --- End of inner exception stack trace ---


使用这个文件就可清楚的看到是哪里出了问题:

  1. 下载 DNNDebug.rar 文件并解压得到 "DNNDebug.aspx" 文件
  2. 把这个文件放在DotNetNuke网站的根目录里
  3. 然后在浏览器里访问这个文件 (如: http://localhost/Dotnetnuke/DNNDebug.aspx)
  4. 输入加载时出错的web contol地址(比如: ~/DesktopModules/Feedback/Feedback.ascx)
  5. 如果帮你解决的大问题,你可以给作者Nik 发个邮件表示感谢

 

转自博文:http://www.cnblogs.com/DotNetNuke/archive/2008/06/18/1224185.html

 

你可能感兴趣的:(debug,asp.net,DNN)