{"id":114,"date":"2007-05-11T18:43:04","date_gmt":"2007-05-11T06:43:04","guid":{"rendered":"http:\/\/craig.dubculture.co.nz\/blog\/2007\/05\/11\/debugging-net-common-language-runtime-debugging-services-application-has-generated-an-exception-that-could-not-be-handled\/"},"modified":"2007-05-11T21:31:59","modified_gmt":"2007-05-11T09:31:59","slug":"debugging-net-common-language-runtime-debugging-services-application-has-generated-an-exception-that-could-not-be-handled","status":"publish","type":"post","link":"http:\/\/craig.dubculture.co.nz\/blog\/2007\/05\/11\/debugging-net-common-language-runtime-debugging-services-application-has-generated-an-exception-that-could-not-be-handled\/","title":{"rendered":"Debugging .NET - \"Common Language Runtime Debugging Services Application has generated an exception that could not be handled\""},"content":{"rendered":"<p>ProfileTool doesn't work on half the machines I try it on. I get an error like:<\/p>\n<p><font color=\"#ff0000\">Profiletool.exe Common Language Runtime Debugging Services<br \/>\nApplication has generated an exception that could not be handled.<br \/>\nProcess ID=0x14 (1300), Thread Id=0xe8(232)<\/font><\/p>\n<p><font color=\"#ff0000\">Click OK to terminate the application.<br \/>\nClick CANCEL to debug the application.<\/font><\/p>\n<p>There's no point searching Google for the process ID and thread number; they're unique to your instance.<\/p>\n<p>What can you do here? You get an error suggesting that 'debugging failed' if you hit Cancel - this is correct, because you don't have a debugger installed!<\/p>\n<p>First step, if you're running your .NET application off the network, stop, move it to your local disk, and try again.  The default security policy doesn't let you do this - you can edit it in the Administrative Tools if you need to.<\/p>\n<p>Now, if you still get the error, drop to a command line, and run the following:<\/p>\n<pre>\r\nProfileTool 2&gt;error.log<\/pre>\n<p>This redirects the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Standard_streams#Standard_error_.28stderr.29\">standard error output<\/a> to error.log, which you can then read. Linux\/UNIX outputs this to the terminal by default; Windows hides it.<\/p>\n<p>Thanks to <a href=\"http:\/\/groups.google.com\/groups?hl=en&amp;lr=&amp;ie=UTF-8&amp;oe=UTF-8&amp;threadm=OYy9XVhQDHA.304%40tk2msftngp13.phx.gbl&amp;rnum=3&amp;prev=\/groups%3Fq%3D%2522Application%2Bhas%2Bgenerated%2522%2Bday%2Bgroup%253Amicrosoft.public.dotnet.*%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8\">Frank Racis<\/a>, by way of <a href=\"http:\/\/www.sharepointblogs.com\/mohamedyehiablog\/archive\/2006\/04\/11\/5841.aspx\">Mohamed Yehia<\/a>.<\/p>\n<p>The actual error, in this case, was \"<a href=\"http:\/\/support.microsoft.com\/kb\/890737\">No mapping between user accounts and security IDs was done<\/a>\", which really means \"don't catch System.SystemException when you are throwing System.Exception\". And when you're testing new builds, don't sit behind an ISA server which aggressively caches the old build.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ProfileTool doesn't work on half the machines I try it on. I get an error like: Profiletool.exe Common Language Runtime Debugging Services Application has generated an exception that could not be handled. Process ID=0x14 (1300), Thread Id=0xe8(232) Click OK to terminate the application. Click CANCEL to debug the application. There's no point searching Google for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[66,68],"tags":[2,3,4],"_links":{"self":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts\/114"}],"collection":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":0,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"wp:attachment":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}