Tuesday, September 07, 2004 - Posts

Custom Build Providers in ASP.NET 2.0

I'm sure everyone is reading Fritz Onion's blog, but for the handful who do not, Fritz has a great post about creating custom build providers in ASP.NET 2.0.

The main point is that the “/code” (soon to be changed to “/Application_Code“) directory under your ASP.NET 2.0 web site can host files with custom extensions (in addition to the out-of-the-box supported .cs, .vb, .wsdl and .xsd.)  You write a build provider and associate the file's extension with it, then ASP.NET will automatically invoke your provider.  You supply the CodeDom logic in the build provider and ASP.NET will make the resulting assembly automatically available to your web site's code (with full IntelliSense.)

We've been doing something similar for quite some time here at Monster by leveraging the CodeDom for certain aspects of our data access, so it seems this could be a great feature for us to leverage.

I'm continually impressed with the number of things that have gotten better with Whidbey.  Now, I'm off to find some more.

-Chris