asp.net mvc调试器抛出SEHException

时间:2011-08-02 09:39:25

标签: asp.net asp.net-mvc visual-studio-2010 debugging visual-studio-debugging

当我尝试在VS中调试(使用F5)应用程序时,它向我显示以下异常:

External component has thrown an exception.

,这是堆栈跟踪:

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

异常详细信息:

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

来源错误:

在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。

堆栈追踪:

[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()

这里有什么问题吗?

1 个答案:

答案 0 :(得分:5)

如果您有来自Trusteer的任何应用程序(如支持或任何东西),只需卸载并重新启动系统,它就可以正常工作......

在这里找到了这个解决方案:

http://forums.asp.net/t/1704958.aspx/8/10?Re+SEHException+thrown+when+I+run+the+application

我不知道为什么这个人只是更新软件并没有检查它是否导致任何其他应用程序问题...疯狂......