由于我将ASP.NET MVC 1应用程序的更新版本上传到服务器,因此Yellow Screen of Death已更改为以下内容:
I?%&/m?{J?J??t??$ @ iG#)* eVe] f @ 흼 { { ; N' ?\fdl J ɞ! ?〜|?" Ey ')= y6 h ͼhR L w | 2= Ez< 7 :5 < + ??:? ?T????W?v?<[??~2?g?2??????y?hY???????t? _N???M?l?????{?,??Xn???Q?}?????*g???????7?? ~?oy j'u>K { IW4 > U w | = -fYzR-
当通过远程桌面(Windows Server 2008 R2,IE8)直接在服务器上访问有错误的页面时,IE甚至会尝试下载响应,但会出现错误(消息框).
以前有人遇到过这个吗?不知道怎么解决这个问题?
我也发现了这个问题,看起来非常简单,但遗憾的是现在还没有得到解答:ASP.NET MVC应用程序显示奇怪的字符
我以为.Net代码被编译成MSIL,所以我总是想知道黄色屏幕是如何产生错误的代码的.如果它正在执行已编译的代码,编译器如何能够从错误消息中的源文件生成代码?
随意编辑这个问题/标题,我知道它没有意义.
我已经达到了死亡的黄页.所以我用Google搜索了这条消息:
[SEHException(0x80004005):Een extern onderdeel heeft een uitzondering veroorzaakt.] Microsoft.VisualStudio.Web.PageInspector.Runtime.NativeMethods.CloseHandle(IntPtr hHandle)+0 Microsoft.VisualStudio.Web.BrowserLink.Runtime.ArteryConnectionUtil.MappedFileExists(String fileName )+39 Microsoft.VisualStudio.Web.BrowserLink.Runtime.ArteryConnectionUtil.ReadAllLinesFrom(String fileName)+66 Microsoft.VisualStudio.Web.BrowserLink.Runtime.ArteryConnectionUtil.GetAllInstanceFileNames()+67 Microsoft.VisualStudio.Web.BrowserLink.Runtime.ArteryConnectionUtil .FindArteryConnection(String applicationPhysicalPath,ArteryConnectionData&connection)+48 Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.PageInspectorHttpModule.OnPreRequestHandlerExecute(Object sender,EventArgs e)+351 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()+142 System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean&completedSynchronously)+96
我有Win 8.1 x64并以管理员身份运行VS并使用IIS来托管我的mvc 5项目.我已经将这个添加到我的web.config来压制异常,正如我在谷歌找到的其他一些stackoverflow问题中提到的那样:
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Web.PageInspector.Runtime" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="12.3.0.0" />
</dependentAssembly>
</assemblyBinding>
Run Code Online (Sandbox Code Playgroud)
问题是我禁用了browserlink.我在firefox和chrome中有这个,所以它似乎是一个crossbrowser/non-browser bug.我有这个在visual studio 2013.4和2015 ctp6(不确定哪个ctp是当前的atm)IIS Express似乎工作,但这只是一个解决方法.如果我坚持要从IIS网络服务器托管,该怎么办?
在我读过的一些书中,据说隐藏黄色死亡屏幕(显然)很好,但不仅仅是因为它对用户来说是非正式的,而且因为黑客可以使用破解您网站的信息.
我的问题是这个.黑客如何使用这些信息?.NET调用堆栈的基本操作的调用堆栈如何帮助黑客?
我附上了我在很久以前创建的一个网站上遇到的黄色死亡屏幕,这引起了我的兴趣.(错误是它在尝试将查询字符串参数强制转换为int时失败.是的,我知道它的错误代码,我多年前写过它;)

例如,我们想从Global.asax错误处理程序中捕获用于erorr报告电子邮件的YSOD输出.有没有办法利用内置的ysod生成器?
asp.net error-logging yellow-screen-of-death error-reporting
我在http://regextester.com上构建了这个正则表达式来解析YSOD,但是VS抱怨语法错误.我确信我错过了某个地方的逃生,但我空白了.
这是原始形式.任何帮助表示赞赏.
var rxYSOD = /<!--\s*\[(.*?)]:(\s*.*\s(.*\n)*?)\s*(at(.*\n)*)-->/gs;
Run Code Online (Sandbox Code Playgroud)
更新: Kobi指出了显而易见的事情让我再次感动.对于那些感兴趣的人,这是一个有效的JavaScript来测试和解析ASP.net黄色死亡屏幕(YSOD)的XMLHttpRequest.responseText.
var rxYSOD = /<!--\s*\[(.*?)]:(\s*.*\s(.*[\n\r]*)*?)\s*(at(.*[\n\r]*)*)-->/;
if (rxYSOD.test(text)) {
// looks like one..
var ysod = rxYSOD.exec(text);
errObj = { Message: ysod[2], StackTrace: ysod[4], ExceptionType: ysod[1] };
}
Run Code Online (Sandbox Code Playgroud)
@Kobi - 这是结果和我想要解析html的原因,即使我得到500:
{
"message": " Unknown web method ValidateUser.\r\nParameter name: methodName\r\n",
"stackTrace": "at System.Web.Script.Services.WebServiceData.GetMethodData(String methodName)\r\n at System.Web.Script.Services.RestHandler.CreateHandler(WebServiceData webServiceData, String methodName)\r\n at System.Web.Script.Services.RestHandler.CreateHandler(HttpContext context)\r\n at System.Web.Script.Services.RestHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)\r\n at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)\r\n at System.Web.HttpApplication.MapHttpHandler(HttpContext …Run Code Online (Sandbox Code Playgroud) javascript regex asp.net yellow-screen-of-death xmlhttprequest
具体来说,我们正在尝试将我们的telerik控件升级到最新版本.不幸的是,旧的DLL已经很老了,很多控制属性都发生了很大的变化,所以我们决定只升级给我们带来问题的telerik控件(RadEditor控件).
所以bin看起来像这样:
RadChart.Net2.dll
RadEditor.Net2.dll (we want to get rid on only this one)
RadGrid.Net2.dll
RadInput.Net2.dll
RadPanelbar.Net2.d
RadSpell.NET2.dll
RadTabStrip.Net2.d
RadToolbar.Net2.dl
RadTreeView.Net2.d
RadUpload.Net2.dll
RadWindow.Net2.dll
Telerik.Web.UI.dll (this is the new DLL)
Run Code Online (Sandbox Code Playgroud)
问题是从旧DLL到新DLL(Telerik.Web.UI)的所有命名空间和类都是相同的.
这是我得到的具体错误:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0433: The type 'Telerik.Charting.ChartSeries' exists in both 'c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\c6516654\63e1c826\assembly\dl3\9aa96a66\00ba04b3_fd85c701\RadChart.Net2.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\c6516654\63e1c826\assembly\dl3\8fdb0e6c\001aa55c_c4f9c901\Telerik.Web.UI.DLL'
Run Code Online (Sandbox Code Playgroud)
我已经考虑过GAC新的DLL,但我不确定这会对情况有所帮助.任何帮助将不胜感激.
我不得不接管另一个开发人员的MVC 3项目.他做的第一件事就是停止黄色死亡屏幕,以便所有异常只记录到文件中.您现在只获得一条通用消息,说明发生了错误.
我想重新打开它(因为它一直很烦人,必须一直检查日志文件) - 我该怎么做.
我检查了web.config但我看不出这发生了什么.
我确实试过做了customersrors = off,但是没有做任何事情.还删除了全局错误处理属性,没有做任何事情.
进一步说明,似乎如果在控制器中发生异常,我会得到死亡的黄色屏幕,但如果它出现在(剃刀)视图中,我只会得到一个标准的通用错误.