CodeAttest

Martin Kulov's Blog

VSTS, Oslo, INETA, ASP.NET, Debugging .NET Applications, Tips and Tricks

January 25, 2008

Precompiled sites and VirtualPathProvider

Coskun Sunali posted an amazing article how you can set up VirtualPathProviders to run when using Precompiled sites.

Do you know that even MS do not use VPP in precompiled sites? Check this out.

This is just an example what you can achieve with Reflector and a lot of patience.

(The support for VPP is explicitly disabled in precompiled sites by Microsoft. We do not know the reasons why they did it, so please you this fix with careful testing :).)

Good work Josh!

Labels: ,


# posted by Martin Kulov @ 3:27 AM |




January 23, 2008

.NET Source Code Debugging Tips

John Robbins is the ultimate debugging hero for me.

Read to what John Robbins says about the new released .NET Framework Source Code:

  1. If you've been downloading your symbols with the Microsoft Symbol Server, make sure to delete your cache directory before you start downloading from the new symbol location.
  2. Shawn says you'll want to check the "Search the above locations only when symbols are loaded manually" in the Options dialog, Debugging, Symbols node. Personally, I think it's much better to leave that unchecked so that you get the symbols and source downloaded automatically. Yes, there will be some slowdowns on the download, but by getting the symbols and source every time you access the item, you'll fill up the cache quicker.
  3. If you're having some trouble getting everything to work, turn on the source server diagnostic messages in the Options dialog, Debugging, General node:


Also, as you are loading downloading source files by double clicking on them in the call stack window, you can see the path reference location in the status bar.

  1. To get both the new Reference Symbol Server and Microsoft Symbol Server set in your _NT_SYMBOL_PATH environment variable to the following:
    UPDATE: This is the correct syntax
    SRV*c:\symbols*http://referencesource.microsoft.com/symbols;
    SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
  2. For you advanced hackers out there, I tried like crazy to get SYMCHK and PDBSTR to work for pre-downloading and bulk source extraction working, but with no luck at all. It appears that the WinDBG tools don't have support for source servers that use http downloads, but the QFE added that support to Visual Studio 2008. (See my article if you don't know what I'm talking about.)

Read original post.

Labels: , ,


# posted by Martin Kulov @ 1:48 AM |




January 22, 2008

COMException loading solution

Happy New Year to all of you! I hope that my blog will keep helping you solve problems that are really tough to find.

Recently I bumped into a very strange problem when I tried to open a fresh new solution from the source control and then I got a strange error -  Microsoft Visual Studio - System.Runtime.InteropServices.COMException:

System.Runtime.InteropServices.COMException

I wonder what the Cancel button will do here, but that is a different story.

A quick look at Solution Explorer, showed that all projects were loaded successfully except one - a Web Application Project.

I put some time to dig in with WinDbg and then I got some tips on what is going on.

In order to load the Web Application Project you must make sure that the URL that the project is using, is valid and can be resolved. This can happen pretty often since when you download a project from source control for the first time, it is highly unlikely that you will have the web site already set up.

And important note that I have to make also is that if you are running Vista, you should run in elevated privileges as well.

Using Web Application Projects is not really my choice for web site development. I would rather choose the new Web Site model. I hope that I will have the time to go further into this topic here.

The problem is reported to Microsoft and will be fixed in VS2008 SP1 (no date has been announced yet).

Labels: , ,


# posted by Martin Kulov @ 12:22 AM |




This page is powered by Blogger. Isn't yours?

 




Calendar Martin Kulov's Calendar   RSS Aggregate this blog

DevReach - The Premier Conference for Microsoft Technologies for SEE

Mobility Day 2008 Conference

DevReach - The Premier Conference for Microsoft Technologies in Bulgaria

International Association of Software Architects

SofiaDev .NET User Group

Microsoft Most Valuable Professional

View Martin Kulov's profile on LinkedIn

MSDN Event Bloggers




Recent posts




History




 
Copyright © 2004-2008 CodeAttest Ltd. All Rights Reserved.