<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>robgruen's WebLog : Debugging</title><link>http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx</link><description>Tags: Debugging</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Getting a System.Runtime.InteropServices.COMException when trying to use BitmpaMetadata to extract EXIF/XMP data?</title><link>http://blogs.msdn.com/robgruen/archive/2009/11/17/getting-a-system-runtime-interopservices-comexception-when-trying-to-use-bitmpametadata-to-extract-exif-xmp-data.aspx</link><pubDate>Wed, 18 Nov 2009 01:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9924001</guid><dc:creator>robgruen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/9924001.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=9924001</wfw:commentRss><description>&lt;P&gt;Well if that's the case, it's probably cause you're attempting to use this class from a MTA thread.&amp;nbsp; In order to fix this, just change the apartment of the thread where this code is running from MTA to STA (either using the [STAThread] Attribute or by setting the ApartmentState member of the thread that you're spinning off to run this code).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Here's the details of the exception:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;System.Runtime.InteropServices.COMException occurred&lt;BR&gt;&amp;nbsp; Message="A null reference pointer was passed to the stub. (Exception from HRESULT: 0x800706F4)"&lt;BR&gt;&amp;nbsp; Source="PresentationCore"&lt;BR&gt;&amp;nbsp; ErrorCode=-2147023116&lt;BR&gt;&amp;nbsp; StackTrace:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.HRESULT.Check(Int32 hr)&lt;BR&gt;&amp;nbsp; InnerException: &lt;BR&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9924001" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/Digital+Photography/default.aspx">Digital Photography</category></item><item><title>Referencing Sharepoint Assemblies on x64bit Installs causes build errors for ASP.NET apps (in VS.NET 2005)</title><link>http://blogs.msdn.com/robgruen/archive/2007/08/17/referencing-sharepoint-assemblies-on-x64bit-installs-causes-build-errors-for-asp-net-apps-in-vs-net-2005.aspx</link><pubDate>Sat, 18 Aug 2007 01:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4437629</guid><dc:creator>robgruen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/4437629.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=4437629</wfw:commentRss><description>&lt;P&gt;You may encounter the following error if you are trying to build a ASP.NET application or web service on a x64bit machine where Sharepoint is installed:&lt;/P&gt;
&lt;P style="COLOR: red"&gt;&lt;EM&gt;Error&amp;nbsp;1&amp;nbsp;Could not load file or assembly 'Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.&amp;nbsp;C:\Documents and Settings\robgruen\My Documents\Visual Studio 2005\WebSites\MyWebService\Web.Config&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;What happens is that the ASP.NET compiler is a 32bit process and tries to load 32 bit assemblies.&amp;nbsp; Since you're on a 64 bit box and the Sharepoint install NGENs it's asseblies, there are only 64 bit assemblies available.&amp;nbsp; This causes the compiler to not load the referenced assemblies (Microsoft.Sharepoint.*.dll) and causes the error shown even though the assemblies are in the GAC, bin folder, etc.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;You can fix this problem by placing 32bit versions of the referenced assemblies in the bin folder of your web application.&amp;nbsp; Unfortunately IL versions of the Sharepoint dlls do not ship with the Sharepoint SDK so you'll have to find a 32 bit install of Sharepoint where you can grab the dlls from.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4437629" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Installing Displays #5 &amp; #6 on my workstation</title><link>http://blogs.msdn.com/robgruen/archive/2007/01/24/installing-displays-5-6-on-my-workstation.aspx</link><pubDate>Thu, 25 Jan 2007 03:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1524611</guid><dc:creator>robgruen</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/1524611.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=1524611</wfw:commentRss><description>&lt;P&gt;So I get my third dual head card in the mail the other day and after two days of patient waiting I took the plunge to install it.&amp;nbsp; Well, to make a long story shorter, it took me all day to get working.&amp;nbsp; Typically you just add the video cards and voila, things work without a hitch, well, not this time.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;What I thought was going to be an easy thing was definitely not.&amp;nbsp; Putting the video card in and installing the drivers went fine but when I went to the display properties settings dialog I got a very bogus error message:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The currently selected graphics display driver cannot be used. It was written for a previous version of Windows NT, and is no longer compatible with the current version of Windows NT. &lt;BR&gt;&lt;BR&gt;The system has been started using the default VGA driver. &lt;BR&gt;&lt;BR&gt;Please contact your hardware manufacture to get an upgraded driver, or select one of the Microsoft provided drivers. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, I know this error message is bogus because the video card works by itself in the system and the drivers are WHQL certified.&amp;nbsp; When I opened up the device manager it stated "this device is working properly." So I know the error was just hiding the true cause of the problem.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;I started playing all the tricks I know with the video card, swapping the PCI bus order, changing PCI/PCIe slots to initalize 1st, nothing worked.&amp;nbsp; What worked was any two combinations of the video cards (they are all heterogenous manufacturers &amp;amp; drivers), but never all three at once.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I finally came across the holy grail of my problem when reading display driver documentation.&amp;nbsp; It turns out that display adapters are given a certain slice of memory to load in and if the total size of the drivers exceeds this allotment the driver won't load.&amp;nbsp; Hence why two cards always worked but the third card always failed.&amp;nbsp; You can set a registry key to change the default memory footprint and increase it such that you have enough space for the drivers to load.&amp;nbsp; I first change the value to 16MB, which should be enough for most folks having this problem, and then subsequently to 32MB before I was able to run all six displays on my machine without a hitch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;So, if you are getting the above error message when going to the settings tab of your machine and have multiple video drivers installed and have already tried &lt;A class="" href="http://support.microsoft.com/kb/165318" mce_href="http://support.microsoft.com/kb/165318"&gt;Q165318&lt;/A&gt;, set the following registry value (please make sure your system's backed up before you play with this registry setting):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\SessionImageSize&lt;/P&gt;
&lt;P&gt;&amp;nbsp;DWORD 0x10&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1524611" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>How Can You Update Your Computer When the Thing That Updates Your Computer Is Broken?</title><link>http://blogs.msdn.com/robgruen/archive/2006/07/26/679763.aspx</link><pubDate>Thu, 27 Jul 2006 05:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:679763</guid><dc:creator>robgruen</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/679763.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=679763</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;STRONG&gt;Simple, YOU CAN'T!!!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;For a while now my computer's &lt;A href="http://support.microsoft.com/?kbid=306525"&gt;Automatic Updates&lt;/A&gt; has been broken.&amp;nbsp; No new downloads have appeared, the control panel icon is missing, and the Windows Update site can't install the updated ActiveX&amp;nbsp;control.&amp;nbsp; Every time&amp;nbsp;I go to the site it tries to update the WU client and I keep getting this 0x800703E3 funky error code.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://inetexplorer.mvps.org/archive/wuc.htm"&gt;&lt;FONT face=Verdana&gt;Windows Update Codes&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;- My error is pretty cryptic: &lt;FONT color=#006400&gt;"The I/O operation has been aborted because of either a thread exit or an application request"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;I tried once already to fix it a while back but no luck so I just lived without it.&amp;nbsp; Well, now I can't access certain resources since some security policies that I'm subject too aren't installed on my box.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;...Darn, I should have fixed the WU problem when I had the chance.&amp;nbsp; Being stuck in IT limbo isn't fun! I didn't want to waste more of my time or some support engineer's time so I resigned myself to fix my own problem.&amp;nbsp; Go me!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;I whipped out my &lt;A href="http://www.swissarmy.com/"&gt;Swiss Army&lt;/A&gt; IT-Problem-Solver&amp;nbsp;and selected the &lt;A href="http://www.sysinternals.com/utilities/filemon.html"&gt;FileMon tool&lt;/A&gt;.&amp;nbsp; Clearly visible to me were the marks from the last problem conqured by this device, in the include filter I could see &lt;EM&gt;"de*.exe"&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;I quickly configured the tool for this operation by setting the filter to "iexplore.exe" and turned on the capture.&amp;nbsp; Then, I navigated the browser to &lt;A href="http://windowsupdate.microsoft.com"&gt;http://windowsupdate.microsoft.com&lt;/A&gt; and waited impatiently for the ugly beast to appear.&amp;nbsp; "There!" I whispered then snickered as I switched back to filemon and stopped the capture.&amp;nbsp; I swiftly began searching for anything out of the ordinary.&amp;nbsp; I was expecting to see some ACC_DENIED or FILE NOT FOUND errors but nothing.&amp;nbsp; There appeared to be no suspicious entries until about half way up the log...at row 9087 I saw it, my first real clue:&amp;nbsp; DEVICE DATA ERROR, and another ar row 9084:&amp;nbsp; IN PAGE ERROR.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;"Hmmmm..." I thought as I looked at the file name: c:\windows\system32\&lt;FONT color=#ff1493&gt;wuaucpl.cpl&lt;/FONT&gt;.&amp;nbsp; Immediately I was able to recall what I know and what I could infer about this file:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;The "WU" portion of the file most likely stands for "Windows Update".&amp;nbsp; I quick check on the &lt;A href="http://support.microsoft.com/dllhelp"&gt;dll help database&lt;/A&gt; could verify it for sure but I skipped that.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana&gt;The extension CPL is used for control panel icons.&amp;nbsp; These files are actually executables with just a different extension.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Given these facts I browsed to the file with windows explorer and tried to launch the exe (wuaucpl.cpl).&amp;nbsp; When I launched it I got an error:&amp;nbsp; "Failed to launch executable due to an exception" or something along those lines.&amp;nbsp; I didn't write the error message down because I was on to something and wasn't thinking clearly.&amp;nbsp; Sorry for all you Googler's, &lt;EM&gt;et. al. &lt;/EM&gt;out there.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;This &lt;STRONG&gt;was&lt;/STRONG&gt; my smoking gun, a bad file (or bad sector on the disk where this file got put last time I defragged).&amp;nbsp; All I had to do was replace the file with a good image of it.&amp;nbsp; &lt;/FONT&gt;&lt;FONT face=Verdana&gt;If I were smart, and I'm not, I would have done a restore point when I first got this error.&amp;nbsp; That would have easily restored the file to it's original shine.&amp;nbsp; Unfortunately, again since I'm not smart, that restore point is so far gone not even a terrabyte worth of restore points could have kept track of it. Well, maybe 1 TB, but certainly not 1 GB worth!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Luckily I'm a computer nerd and had a secondary computer around where I could just copy this file.&amp;nbsp; Thankfully the donor computer was of a similar breed and the file name, timestamp, and all the other things Windows File Protection cares about was the same so I could just overwrite the existing file and be on my way.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Here I sit writing this entry as my computer happy checks for updates and downloads the...hold on a sec&amp;nbsp;while I check....127.7MB of updates needed for my computer.&amp;nbsp; I'm sure there will be a second, if not third batch by the time all of the updates are applied.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;So kids, what is the moral of the story?&amp;nbsp; If you're getting error number 0x800703E3&amp;nbsp;when visiting windows update, use filemon to see what file the update is failing on.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Happy updating ever after!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=679763" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Connection_Dropped Error in the HTTPERR Log for IIS</title><link>http://blogs.msdn.com/robgruen/archive/2006/01/03/508923.aspx</link><pubDate>Wed, 04 Jan 2006 00:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:508923</guid><dc:creator>robgruen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/508923.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=508923</wfw:commentRss><description>&lt;P&gt;I was trying to install a web service on a freshly build W2k3 box.&amp;nbsp; I checked the event log and found:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event code: 3005 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event message: An unhandled exception has occurred. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event time: 1/3/2006 12:50:03 PM &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event time (UTC): 1/3/2006 8:50:03 PM &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event ID: e85fe2d9c6c84f9287d5bed943869d42 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event sequence: 1 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event occurrence: 1 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Event detail code: 0 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Application information: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Application domain: /LM/w3svc/1/ROOT/DirectoryLookup-7-127807950038139240 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Trust level: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Application Virtual Path: /DirectoryLookup &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Application Path: c:\Inetpub\wwwroot\DirectoryLookup\DirectoryLookup\ &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Machine name: localhost&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Process information: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Process ID: 2244 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Process name: w3wp.exe &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Account name: NT AUTHORITY\NETWORK SERVICE &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Exception information: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Exception type: HttpException &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Exception message: The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Request information: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Request URL: http://localhost/DirectoryLookup/DirectoryLookup.asmx &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Request path: /DirectoryLookup/DirectoryLookup.asmx &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;User host address: 127.0.0.1 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;User: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Is authenticated: False &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Authentication Type: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Thread account name: NT AUTHORITY\NETWORK SERVICE &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Thread information: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Thread ID: 1 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Thread account name: NT AUTHORITY\NETWORK SERVICE &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Is impersonating: False &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Stack trace: at System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffa500 size=1&gt;Custom event details: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#ffa500&gt;For more information, see Help and Support Center at&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding permissions to the folder specified in the error fixed the problem.&amp;nbsp; HTH someone else out there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=508923" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Here's a cryptic RegAsm Error you might see with VS.NET 2005</title><link>http://blogs.msdn.com/robgruen/archive/2005/12/19/505650.aspx</link><pubDate>Tue, 20 Dec 2005 01:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:505650</guid><dc:creator>robgruen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/505650.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=505650</wfw:commentRss><description>&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff00" size=1&gt;Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42&lt;BR&gt;Copyright (C) Microsoft Corporation 1998-2004.&amp;nbsp; All rights reserved.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff00" size=1&gt;RegAsm : error RA0000 : Could not load file or assembly 'MyAssembly, Version=0.0.&lt;BR&gt;0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Exception&lt;BR&gt;&amp;nbsp;from HRESULT: 0xE0434F4D&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Now I know my assembly has version 1.0.0.0 so this doesn't make sense....nor did the fact that using &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrffusionlogviewerfuslogvwexe.asp"&gt;fuslogvw&lt;/A&gt; didn't show any assembly binding failures and &lt;A href="http://www.sysinternals.com/utilities/filemon.html"&gt;filemon &lt;/A&gt;showed that the file is being located and read from without any problems.&amp;nbsp; Well, now what?&amp;nbsp; Create a simple .NET project (doesn't matter what), and set the debugging options to launch an external program (c:\windows\microsoft.net\framework\v2.0.50727\regasm.exe) and set the command line arguments to pass in the dll you're trying to register.&amp;nbsp; Also configure the debugger to break when excpetions are thrown.&lt;/P&gt;
&lt;P&gt;Run the project and the IDE will break on the underlying exception that's causing the whole thing to bust.&amp;nbsp; In my case it was this exception:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff0000 size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DLL 'MyAssembly.dllis attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=505650" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>The Case of the Mysterious Hanging Shell</title><link>http://blogs.msdn.com/robgruen/archive/2005/06/14/428896.aspx</link><pubDate>Tue, 14 Jun 2005 15:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:428896</guid><dc:creator>robgruen</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/428896.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=428896</wfw:commentRss><description>&lt;P class=MsoNormal align=center&gt;&lt;SPAN&gt;Please note that the identities mentioned in this story have been changed to protect the innocent.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Any names that coincide with real life people is purely coincidental.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So there I was, calmly working away when I get the phone call that started it all.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I pick up the phone, “Hello?” I ask.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;“Yo, it’s me Jason, ” he replies while chuckling.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I know what this means, he needs computer help.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“Dude, I need a favor.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;My tablet’s busted!”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I think to myself that he’s either dropped it or he doesn’t know how to use it since it’s brand spankin’ new.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;So after a deep breath I ask,&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“What’s the problem?”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;“Man, I know this computer is supposed to be faster than my old one but it isn’t.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Everything’s stuck but if I wait then it comes back and it’s cool for a bit then sucks again.”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;With my years of computer experience I can decrypt the previous statement from useless blabber into computer speak:&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“The computer repeatedly hangs temporarily.”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;After a few moments of careful assessment I replied with the fact that it was some minor glitch, network outage or something, and that he was just being impatient.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“The tablet is not going to be as fast as a workstation, the hard drive has a much slower rotational speed and therefore it will inherently be slower.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;“But dude, couldn’t you just look at it for me?”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;“Sure, why not, you’ll have to bring it to me.”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Within hours I the tablet was sitting on my desk.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;There it was, a sleek &lt;A href="http://www.toshibadirect.com/td/b2c/cmod.to?seg=HHO&amp;amp;coid=-26373&amp;amp;sel=0&amp;amp;rcid=-26367&amp;amp;ccid=1291021"&gt;Toshiba Portege M205&lt;/A&gt; with less than 1000 miles on it.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I didn’t allow my envy to cross my face while I beheld it’s beauty.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;After I was done with my careful visual inspection I inquired about the problem, “so, show me what the problem is.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;“Do anything, it sucks really bad man!&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I have half a mind to take it back.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I grinned, “I’ll take it!”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I tried to begin my investigation by right clicking on the Start button and selecting Explore.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Nothing happens.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I get the wait cursor and the entire shell becomes useless.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I bring up Task Manager using CTRL+SHIFT+ESC, thankfully it appears.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;CPU usage is floating between 0% and 2%, memory usage 224MB out of 512MB physical and 2560MB virtual.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This seems fine to me.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I check the network tab and see virtually no activity.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Hard drive light?&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Same result.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Well, now what I think to myself.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“How long has this been happening I ask?”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;“For about a month” Jason confesses.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;“A MONTH,” I retort!&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“No wonder you want to take it back!&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I wouldn’t want to work with this for more than 30 minutes.”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Jason has to leave for a meeting but is willing to leave the tablet with me for the duration of the meeting.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I told him I’d do my best, “No promises though.”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;With yet another grin I continue, “but if I fix it you’ll buy me dinner?”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I get the answer I was looking for:&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“Wherever you want to go man, it’s on me.”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I ushered him out of my office and babbled something about needing some quite time or something, and got to work.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;After some more playing around I determined that it appeared that only the shell was affected by the slow down.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Once an application was up and running it responded fine and didn’t exhibit the behavior that the shell was suffering from.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Then something curious happened, I unplugged the network cable tried my 1&lt;SUP&gt;st&lt;/SUP&gt; test (launching explorer), and boom, there it was virtually as fast as I clicked the “Explore” menu item.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I whispered to myself, “very interesting.”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Just for the heck of it I tried it again a few times and got the same results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Instead of pondering this for to long I called the big guns.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“Harris old buddy, I’ve got a quick question for you…”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I relay the entire story and after some deliberation we determine that something must be in use by the shell that is relying on network connectivity.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I quickly thank Harris and jump off the phone and back to the problem at hand.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Thoughts of dinner are fueling my troubleshooting efforts, I can already taste the food.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I think to myself that Jason shouldn’t have offered dinner since it’s gonna cost him.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;As frustrated as he was I could get a really nice meal out of this whole deal.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I pick one of my trusty troubleshooting tools:&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://www.sysinternals.com/Utilities/Regmon.html"&gt;Regmon&lt;/A&gt;.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I run regmon, plug the network cable back into the tablet and then reproduce the problem.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The resulting log contained about eight thousand rows of registry accesses that I had to parse through.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;After about ten minutes of dredge work I think I find what I’m looking for, an access to a registry key whose value contains a UNC path.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The further I look the more I see intermittent calls to the same key, over and over again.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;To top it off each access consumes about 3 to 5 seconds, “this is it!”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;With my dinner clearly in my sights I recognize that this is a COM object (dll) that has been registered from a network location.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I jot down the GUID (by copying it to the clipboard) and launch regedit.exe.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I locate the registry entries, note the Inprocserver (the dll name) and see if I can what application this belongs to.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;A quick search on MSN reveals that this is some 3&lt;SUP&gt;rd&lt;/SUP&gt; party application that looks useless, no harm in removing it!&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I subsequently purge all of the related keys from the registry and reboot.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I had had the foresight to create an account for myself on the box so I could login since Jason wasn’t around to provide his password.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;So, freshly booted I try to launch explorer while connected to the network and wouldn’t you know it, “Voila!&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Works like a charm!”&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;By now I’m getting hungry and can smell my dinner but it’s not even early afternoon but nonetheless, “Mission Accomplished!”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Since Jason wasn’t around yet I setup the wireless network for my work and took the tablet for a test drive.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;It sure is a nice ride, later I’d confess to walking around the building with it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Jason was pleased to have a working tablet and quickly relayed a story about how the 3&lt;SUP&gt;rd&lt;/SUP&gt; party app was installed (manually from a network location).&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I was able to determine that the problem manifested itself after the network location and dll were no longer available.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Had the registered path existed there would not have been any problems with the shell.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Since the network location wasn’t there it took some time for the shell to do a few retries before it gave up hence the entire delay/hang.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;many months later&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;STRONG&gt;Part Deux - The Case of the Mysteriously Behaving Visual Studio .NET 2003, Class Wizard Accessing the Network?&lt;/STRONG&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I get an e-mail from Tim asking why the VS.NET class wizard would make network access when adding a variable.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Using the repro steps I tried to reproduce the same behavior but nothing.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I immediately recall the experience with Jason and the tablet. &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I replied within a few minutes with a message stating some possible causes including:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;I&gt;&lt;SPAN&gt;"3.&amp;nbsp; some component in use by the shell or VS.NET resides on a network location (the last time I saw this was a COM object registered from a UNC path)"&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;I&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In my mail I requested a netmon trace so we could identify what the network traffic was for.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;A few days later I got my &lt;A href="http://support.microsoft.com/?kbid=310875"&gt;netcap&lt;/A&gt; and saw some network requests for a particular share and file.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Turns out it was an OCX which had been registered from a network share.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;That’s what we call a “slam dunk” problem sloved.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Too bad this time I didn’t get any meals out of it!&amp;nbsp; On top of everything else everyone thinks I was pretty smart for knowing the answer off the top of my head on the 1st go.&amp;nbsp; Experience pays so much, too bad the secret's out now!&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=428896" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Caspol -s Behavioral changes for Whidbey</title><link>http://blogs.msdn.com/robgruen/archive/2005/06/13/428595.aspx</link><pubDate>Mon, 13 Jun 2005 17:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:428595</guid><dc:creator>robgruen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/428595.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=428595</wfw:commentRss><description>&lt;P&gt;We generally use "caspol.exe -s off" as a quick test to determine if .NET framework security plays a part in problems with managed components.&amp;nbsp; It used to be that sometimes people would forget to run "caspol.exe -s on" to turn framework security on.&amp;nbsp; Imagine all the nasties that could infect your box then!&lt;/P&gt;
&lt;P&gt;Well, in Whidbey things are different.&amp;nbsp; Now when you run caspol to turn off .NET framework security you see this in the console window:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;P&gt;&lt;FONT size=1&gt;c:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;caspol -s off&lt;BR&gt;Microsoft (R) .NET Framework CasPol 2.0.50603.0&lt;BR&gt;c Microsoft Corporation. All rights reserved.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;CAS enforcement is being turned off temporarily. Press &amp;lt;enter&amp;gt; when you want to&lt;BR&gt;restore the setting back on.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, now there's chance that security will be comprimised by you forgetting to turn security off since it's temporary.&amp;nbsp; You may ask what happens if caspol terminates unexpectedly?&amp;nbsp; Good question, I tested it!&lt;/P&gt;
&lt;P&gt;If caspol.exe terminates before you hit &amp;lt;enter&amp;gt; to turn security back on &lt;STRONG&gt;it will revert&amp;nbsp;to the ON state.&amp;nbsp; &lt;/STRONG&gt;Here's another side note, running caspol -s on doesn't do anything.&amp;nbsp; You'll see this for output when you try turn security on:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;P&gt;&lt;FONT size=1&gt;c:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;caspol -s on&lt;BR&gt;Microsoft (R) .NET Framework CasPol 2.0.50603.0&lt;BR&gt;c Microsoft Corporation. All rights reserved.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;Because security can no longer be turned off, turning on security does not have&lt;BR&gt;any effect.&lt;BR&gt;Success&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=428595" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>Magic Trick: RPC Debugging Excercise</title><link>http://blogs.msdn.com/robgruen/archive/2005/05/25/421772.aspx</link><pubDate>Wed, 25 May 2005 19:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:421772</guid><dc:creator>robgruen</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/421772.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=421772</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;What you need for this exercise:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;An out of proc COM server &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;A client attempting to call the exe in #1&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;#2 is getting the below hr returned by a call to #1&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;// From WinError.h&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;// MessageId: RPC_E_DISCONNECTED&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;// MessageText:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;//&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The object invoked has disconnected from its clients.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;//&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; RPC_E_DISCONNECTED&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;_HRESULT_TYPEDEF_(0x80010108L)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Both #1 and #2 are on the same machine&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;The latest version of &lt;A href="http://www.microsoft.com/whdc/ddk/debugging/"&gt;Debugging Tools For windows (a.k.a.) WinDBG&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Symbols&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;You can &lt;A href="http://www.microsoft.com/whdc/devtools/debugging/symbolpkg.mspx"&gt;download&lt;/A&gt; the symbol package from the WinDBG website&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;Set your symbols path to point to the &lt;A href="http://msdl.microsoft.com/download/symbols"&gt;public symbol server&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt; Patience&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Let’s assume from this point forward that my particular scenario is that I’ve got many COM clients connecting to an out of proc COM server.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The clients make thousands of calls per hour.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Intermittently calls to the server will return RPC_E_DISCONNECTED.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;If I try the entire process over again it may or may not be successful.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I need to figure out what my server is doing at the point that I see this HR so I can make some changes to prevent this condition from occurring.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Now that you have gotten to this point let’s explain what’s going to happen.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;We are basically going to set a breakpoint on the hresult we are interested in and then force the debugger to take a user dump of all the different components that we’ll need to analyze the problem.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Once we have the user mode dumps we can do a post mortem analysis and make recommendations to resolve the problem.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This is just a particular RPC case, we can do this for any scenario where we want to break on a return value (typically when the value we want is moved into register eax).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;To put a breakpoint on a particular hr and run a command:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;1.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Choose the debugee.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This can either be the client application or the RPC service.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Just a note…debugging RPC can cause your entire system to lock up (right Niel!?). Use caution, or a VPC, when doing this.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;For this situation I chose the client application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;2.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Fire up windbg and figure out where in memory ole32.dll is loaded (see the &lt;B&gt;lm&lt;/B&gt; command, output below).&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;You can also use depends to figure out where this guy wants to be loaded but since we’ve got more work in windbg ahead it’s the easier thing to do.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;start&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;end&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;module name&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;774e0000 7761d000&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ole32&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;3.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Search the memory range of this module for the HR we’re interested in.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;the HR value was found by searching my include directory for RPC_E_DISCONNECTED.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;See the &lt;B&gt;s&lt;/B&gt; command in windbg.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;0:005&amp;gt; s -d 774e0000 L(7761d000-774e0000) 80010108&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;77588d74&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;80010108 000123e9 ce8b5000 ffe61ce8&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;.....#...P......&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;77589594&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;80010108 04c25d5e ebc03300 909090f7&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;....^]...3......&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;7758966c&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;80010108 000092e9 18458b00 0874c085&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;..........E...t.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;77603a34&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;80010108 ba3d0774 75800706 fc458b6f&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;....t.=....uo.E.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;4.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Now that you have the addresses (1&lt;SUP&gt;st&lt;/SUP&gt; column) for each location of that hr in memory you can put a breakpoint on those locations and can associate some commands with that breakpoint.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;See the &lt;B&gt;bp &lt;/B&gt;command in windbg.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;See the &lt;B&gt;bl&lt;/B&gt; command to list your breakpoints from the windbg help docs.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;See the &lt;B&gt;.dump &lt;/B&gt;command for creating dump files.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;See the &lt;B&gt;adplus.doc&lt;/B&gt; document that discusses adplus.vbs.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Note that you can interchangeably use –hang instead of –quick if you don’t have your symbol file path set.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;0:005&amp;gt; bp 77588d74 “.dump /mau –f c:\dumps\ClientDumpFile.dmp;!!start c:\program files\debugging tools for windows\adplus.vbs –quite –quick –p &amp;lt;RPC Server Process ID&amp;gt; -p &amp;lt;COM Server PID&amp;gt; -o c:\dumps;g” &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;0:005&amp;gt; bp 77589594 “” &amp;lt;- as above &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;0:005&amp;gt; bp 7758966c “” &amp;lt;- as above&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;0:005&amp;gt; bp 77603a34 “” &amp;lt;- as above&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;0:005&amp;gt; bl&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0 e 77588d74&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0001 (0001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;1 e 77589594&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0001 (0001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;2 e 7758966c&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0001 (0001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;3 e 77603a34&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0001 (0001)&lt;/SPAN&gt;&lt;SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;5.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;The breakpoints from #4 may contain some false positive breakpoints as our hr may line up with some byte pattern in the memory space of the module but it’s unlikely that we’ll hit that breakpoint and if we do it should be easy enough to decipher.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;6.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;By now you should have three dump files all located in the dumps folder.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The clientdumpfile.dmp and two folders created by adplus for each exe.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Now that I’ve gone through that you can put most of this inside of a config file, and use the command line debugger cdb. All the steps get condensed to” cdb –p &amp;lt;Client PID&amp;gt; -c “$&amp;gt;&amp;lt;custom.config”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Here’s the contents of the custom.config file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;bp 77588d74&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“.dump /mau –f c:\dumps\ClientDumpFile.dmp;!!start c:\program files\debugging tools for windows\adplus.vbs –quite –quick –p &amp;lt;RPC Server Process ID&amp;gt; -p &amp;lt;COM Server PID&amp;gt; -o c:\dumps;g”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;bp 77589594&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“.dump /mau –f c:\dumps\ClientDumpFile.dmp;!!start c:\program files\debugging tools for windows\adplus.vbs –quite –quick –p &amp;lt;RPC Server Process ID&amp;gt; -p &amp;lt;COM Server PID&amp;gt; -o c:\dumps;g”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;bp 7758966c&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;“.dump /mau –f c:\dumps\ClientDumpFile.dmp;!!start c:\program files\debugging tools for windows\adplus.vbs –quite –quick –p &amp;lt;RPC Server Process ID&amp;gt; -p &amp;lt;COM Server PID&amp;gt; -o c:\dumps;g”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;bp 77603a34 “.dump /mau –f c:\dumps\ClientDumpFile.dmp;!!start c:\program files\debugging tools for windows\adplus.vbs –quite –quick –p &amp;lt;RPC Server Process ID&amp;gt; -p &amp;lt;COM Server PID&amp;gt; -o c:\dumps;g”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;g&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I didn’t test actually test the syntax of all of the statements above since I don’t have such a scenario handy but I did give them a twice over and look ok.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I’ll make changes to the post as problems are brought to my attention.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=421772" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>What’s “Enable RPC Debugging” option in VS.NET?</title><link>http://blogs.msdn.com/robgruen/archive/2005/05/09/415719.aspx</link><pubDate>Mon, 09 May 2005 15:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:415719</guid><dc:creator>robgruen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/415719.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=415719</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The “Enable RPC Debugging” option is a somewhat well hidden option in Visual Studio .NET.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;It is available in VS.NET 2002, 2003 &amp;amp; 2005.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;You can set/clear this option by navigating to the &lt;B&gt;Tools&lt;/B&gt; menu and selecting &lt;B&gt;Options&lt;/B&gt;.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;On the options dialog select the &lt;B&gt;Debugging-&amp;gt;Native&lt;/B&gt; property page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Unfortunately this setting only applies to C/C++ projects but it does allow you to step into both inproc and out of proc COM servers.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The only thing you need to do is ensure that your solution settings point to the correct source code and symbol location for the COM server.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This might not be news for you for inproc servers (dlls) but may be news for out of proc.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Instead of having to set your project to launch a separate program, launch a second debugger, or manually attach vs.net to your out of proc exe, this option will have VS.NET do all of this for you automatically!&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;There are no timing issues with attaching the debugger or anything, you’d step into the method calls of the out of proc server just as if it were in proc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=415719" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Debugging VB6 binaries in Visual Studio .NET</title><link>http://blogs.msdn.com/robgruen/archive/2004/11/09/254602.aspx</link><pubDate>Tue, 09 Nov 2004 22:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:254602</guid><dc:creator>robgruen</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/254602.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=254602</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;If you are using interop to call into a VB6 ActiveX dll or exe and you need to debug your VB6 project you may find yourself having both VS.NET and the VB6 IDE open.&amp;nbsp; This can certainly be far from efficient.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Typically you set your VB6 project to “Wait for the Component to be created” and you launch your .NET app and then hit breakpoints within the VB6 component.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Well, there’s an easier way to do this.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You can actually debug your VB6 component within VS.NET.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Here’s what you need to do:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol style="MARGIN-TOP: 0in" type="1"&gt; &lt;li class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Build your VB6 project with symbols.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;In VB6 open up your vbp file and goto “Project-&amp;gt;Properties.”&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Select the “compile” tab and check “Compile to Native Code.”&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Then select the “No Optimization” radio button and check “Create Symbolic Debug Info.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;This will generate a .PDB (Program Database) file along with your .EXE.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This file contains the debugging information so the VS.NET debugger can line up source and hit breakpoints, etc.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;(Make sure you have binary compatibility on your VB6 dll set or you’ll have to drop and re-add your reference to the VB6 component in VS.NET.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol style="MARGIN-TOP: 0in" type="1" start="2"&gt; &lt;li class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Open your .NET project in VS.NET.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;li class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Go to the project properties and select the “Configuration Properties-&amp;gt;Debugging” property page and enable unmanaged debugging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: 0.25in; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY: Arial"&gt;For VB.NET projects this option is “Unmanaged code debugging” and for C# is “enable unmanaged debugging.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.25in; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol style="MARGIN-TOP: 0in" type="1" start="4"&gt; &lt;li class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Select the property page for the solution.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;li class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Add to the “Debug Source Files” an entry that points to the path where the source code is for the VB6 component.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;li class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Add to the “Debug Symbols Files” an entry that points to the folder where the .PDB file is that was generated in step 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;li class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;You should now be able to open your .bas, .cls,&amp;nbsp;.frm, etc.&amp;nbsp;files in VS.NET and you can put breakpoints in the file.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Once you debug the debugger will stop on those lines of code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Happy Debugging!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=254602" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category></item></channel></rss>