ASP.NET MVC调试器抛出SEHException异常

6
当我试图在VS中使用F5调试应用程序时,它显示以下异常:
External component has thrown an exception.

以下是堆栈跟踪信息:

描述:在当前 Web 请求执行期间发生未处理的异常。请查看堆栈跟踪以获取有关错误的更多信息以及其在代码中的来源。

异常详细信息:

System.Runtime.InteropServices.SEHException: External component has thrown an exception.`

错误来源:

当前的网页请求执行过程中发生了未处理的异常。可以通过以下异常堆栈跟踪信息确定异常的来源和位置。

堆栈跟踪:

[SEHException (0x80004005): External component has thrown an exception.]
   Microsoft.Win32.Win32Native.CreateFile(String lpFileName, Int32 dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES securityAttrs, FileMode dwCreationDisposition, Int32 dwFlagsAndAttributes, IntPtr hTemplateFile) +0
   Microsoft.Win32.Win32Native.SafeCreateFile(String lpFileName, Int32 dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES securityAttrs, FileMode dwCreationDisposition, Int32 dwFlagsAndAttributes, IntPtr hTemplateFile) +29
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +936
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +82
   System.IO.StreamWriter.CreateFile(String path, Boolean append) +55
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +121
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +29
   System.Web.Compilation.StandardDiskBuildResultCache.SavePreservedSpecialFilesCombinedHash(Int64 hash) +116
   System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate2(StandardDiskBuildResultCache diskCache) +752
   System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(StandardDiskBuildResultCache diskCache) +55
   System.Web.Compilation.BuildManager.RegularAppRuntimeModeInitialize() +174
   System.Web.Compilation.BuildManager.Initialize() +261
   System.Web.Compilation.BuildManager.InitializeBuildManager() +246
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +350

[HttpException (0x80004005): External component has thrown an exception.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9013676
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258

从这个信息中,我只能推断出调试器在执行此操作时崩溃了。
Microsoft.Win32.Win32Native.SafeCreateFile()

这里有什么问题,您有什么想法吗?


2
还有一件事要告诉你,如果你使用ctrl+F5来运行项目,它会启动项目,然后你可以使用F5来启动调试器...很奇怪...通过这样做,它启动了项目,但在尝试渲染主页面时出现了相同的SEHException异常,所以我再次使用ctrl+F5来运行项目并打开页面...然后当我尝试使用F5来调试项目时,它完美地运行了...所以从这个奇怪的行为中,我只能得出结论是渲染开始之前调试器崩溃了...请帮我解决这个问题,以及为什么会出现这种奇怪的行为... - Safran Ali
1
在我的C盘上,我有141GB可用空间,在D盘上有218GB可用空间。我把项目保存在D盘上,因此我认为磁盘空间不会有问题...另外我也运行了磁盘清理,但问题仍然存在。 - Safran Ali
1
如果您安装了Trusteer的任何应用程序(如Rapport或其他),请卸载并重新启动系统,它将正常工作...在此处找到此解决方案:http://forums.asp.net/t/1704958.aspx/8/10?Re+SEHException+thrown+when+I+run+the+application我不知道为什么这些人只更新软件而没有检查它是否会导致其他应用程序出现问题... 疯狂... - Safran Ali
1
停止Trusteer Rapport对我也起作用了。你能把上面的评论复制成答案并接受它作为答案吗?我开始觉得自己快疯了。 - Giles Roberts
2
@dvlpr 一段时间后你将能够接受你的答案。由于这是你的问题,只有你能接受答案。 - cjk
显示剩余3条评论
1个回答

5

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接