6

While I am trying to debug (using F5) the application with in VS, it is showing me the following exception:

External component has thrown an exception.

and here is the stack trace:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:

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

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[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

from this I can only figure out that debugger is crashing while doing this

Microsoft.Win32.Win32Native.SafeCreateFile()

Any idea whats the problem here?

Safran Ali
  • 4,477
  • 9
  • 40
  • 57
  • 2
    and one more thing to let you know that if you run the project using ctrl+F5, it starts the project and after that you can start the debugger using F5 ... strange ... by doing this it started the project but gave the same SEHException while it was trying to render Master page, so I again run the project using ctrl+F5 and open the pages ... and then when I tried to debug the project using F5 it ran perfectly fine ... so from this strange behavior I can only conclude that debugger is crashing before the rendering start ... please help me with this problem and why this odd behavior is working .. – Safran Ali Aug 02 '11 at 09:46
  • 1
    on my c drive I have 141GB free and the d drive I have 218GB free. I keep my project in drive d, so I don't think I have any problem with the disk space ... plus also ran disk cleanup but the issue persist – Safran Ali Aug 02 '11 at 09:59
  • 1
    if you have any application from Trusteer (like rapport or anything ) just uninstall and reboot your system, it'll work fine ... found this solution here: http://forums.asp.net/t/1704958.aspx/8/10?Re+SEHException+thrown+when+I+run+the+application i don't know why this people just update the software and didn't check whether it is causing some other application any issues or not ... crazy ... – Safran Ali Aug 02 '11 at 10:31
  • 1
    Stopping Trusteer Rapport worked for me too. Can you copy the above comment as an answer and accept it as the answer, please? I was starting to think I was going crazy. – Giles Roberts Aug 02 '11 at 12:31
  • 2
    @dvlpr you will be able to accept your answer after a while. As it is your question, only you can accept an answer. – cjk Aug 02 '11 at 12:56
  • @dvlpr Surely you can accept the answer now? You might get a new badge! – Giles Roberts Aug 03 '11 at 15:48
  • That's a shame. You would have thought they'd made a badge for that. – Giles Roberts Aug 05 '11 at 13:38
  • yup they do ... but if my answer is accepted by 3 or more people ... – Safran Ali Aug 05 '11 at 17:45

1 Answers1

5

if you have any application from Trusteer (like rapport or anything ) just uninstall and reboot your system, it'll work fine ...

found this solution here:

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

i don't know why this people just update the software and didn't check whether its causing any other application issues or not ... crazy ...

Safran Ali
  • 4,477
  • 9
  • 40
  • 57