从ASP.NET应用程序中删除.PDB在IIS应用程序突破 [英] Removing .pdb from ASP.NET app on IIS breaks application

查看:120
本文介绍了从ASP.NET应用程序中删除.PDB在IIS应用程序突破的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想部署一个ASP.NET MVC 4应用到IIS 8。
当在VS 2012中选择调试模式构建,应用程序运行在IIS的罚款。
然而,在选择发行方式时,该应用程序提供了一个黄色的屏幕,404错误和对道路不实施一个IController东西。

I'm trying to deploy an ASP.NET MVC 4 application to IIS 8. When built with Debug mode selected in VS 2012, the application runs fine on IIS. However, when Release mode is selected, the application gives a yellow screen with a 404 error and something about the path not implementing IController.

我发现添加.PDB调试符号在IIS上的bin /文件夹中,应用程序启动正常工作。

I found out that adding the .pdb debug symbols to the bin/ folder on IIS, the application starts working fine.

有谁知道为什么发生这种情况?我打得围绕在VS释放模式构建设置,但没有效果。

Does anyone know why this is happening? I've played around with the Release mode build settings in VS, but to no avail.

推荐答案

原来我用的StackFrame类,这当然不无调试符号present工作。
切换到使用CallerMemberName属性在.NET 4.5,现在一切正常!

Turns out I was using the StackFrame class, which of course doesn't work without the debug symbols present. Switched to using the CallerMemberName attribute in .NET 4.5 and everything is working fine now!

这篇关于从ASP.NET应用程序中删除.PDB在IIS应用程序突破的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆