ASP.NET Providers Source Code

posted on 04/13/06 at 10:05:30 pm by Joel Ross

Earlier this year, I spent a lot of quality time with Reflector digging into the XmlSiteMapProvider to figure out how I could make it work with the URL rewriting we were implementing. I eventually found it, and determined what method I had to override to make it work, but if I had to do it again, Scott Guthrie and the ASP.NET team just made my job easier?by releasing the source code to all of the built-in providers in ASP.NET 2.0.

The best part is that it's licenses under a permissive license that allows you to use it in both commercial and non-commercial settings. So now, I could have just tweaked one method and been good instead of inheriting from the provider and overriding a method. Of course, I probably would have done it the same way - that way I'm safer if the built-in providers ever change for things such as bug fixes. I can get those, and still have my overriden method without any work on my part.

But, if I ever wanted to build my own provider (how about a CsvSiteMapProvider?), this is an awesome way to get?a jumpstart and really get an understanding of what's going on. You can do it in reflector, but it's much easier with a buildable project, where (I'm assuming) the developers don't name their variables string1 and string2, like Reflector shows.

Technorati Tags: | |

Categories: ASP.NET