Archives
-
Optimizing your route collection for URL generation in ASP.NET MVC (and more!)
If you're used ASP.NET MVC or ASP.NET Dynamic Data, you've using ASP.NET's new Routing feature. ASP.NET Routing is the feature that lets you easily create so-called "pretty" URLs. Pretty URLs are the ones that look the way you want them to look (e.g. ~/products/beverages), not the way your web application platform forces them to look (e.g. ~/products.aspx?categoryname=beverages).
-
Upcoming talks: Microsoft Tech Ed South Africa
In just a couple of weeks I'll be in Durban, South Africa presenting three sessions at Tech Ed. These are the sessions:
-
HttpContext.IsCustomErrorEnabled - One of ASP.NET's hidden gems
Calling a property a gem might be a bit of an exaggeration, but this particular property is still rather valuable. In many situations a developer wants to enable a feature or part of a feature only for debugging and testing purposes. The IsCustomErrorEnabled property combines three values to tell you whether custom errors are enabled for a particular request. This isn't as simple as reading the web.config file to check the <customErrors> section. There's a bit more going on behind the scenes to truly determine whether custom errors are enabled.
-
MVC: Unit testing controller actions that use TempData
-
MVC: Locking the RouteCollection
Since the advent of multithreaded programming, the responsibility of locking collections has always been a contentious issue. Who should lock the collection? When should it be locked? And for how long? The ASP.NET Routing feature that is used by the MVC framework involves a thread-safe collection that contains the list of the application's route definitions. Will your routes be safe? Continue reading to find out (on this amazing journey (into the depths of the RouteCollection)). How's that for a cheesy intro?
-
MVC: I'll need a little bit more context on that
ScottGu recently announced the plans for the next public preview of the ASP.NET MVC framework. For those who don't feel like clicking on links to other peoples' blog posts Scott's blog says it's being released at MIX08, which is only a couple of weeks away. And yes, I will be there!