Assertion Coolness in ASP.NET 2.0

Published Mon, Mar 28 2005 12:11 | William

As I mentioned in a few other posts, I'm currently working on this app that's going to run w/ SQL Mobile on a Tablet PC as well as a Web equivalent.  The big challenge of the Proof of Concept is that the same code will run on a Tablet PC/Web App/Desktop App etc.  One of the really neat thigns I just came across was with Assertions.  I use Assertions neurotically in my code.  One of the things that sort of sucked in previous versions of ASP.NET is that when they failed, nothing happened.  I found  a work around from John Robbins but natively, the Assertion dialog would never pop up (or at least I couldn't figure out how to make it happen).  Since this was a desktop app, I used assertions as normal and life was good. 

Well, when I started using the class libraries w/ the web part, the very first run through popped up one of my assertion boxes telling me exactly what the problem was (  a configuration setting was missing).  Since I was thorough up front with my assertions, the box told me exactly what the problme was and exactly which setting was missing - as well as an example of what a conforming value would be.  This allowed me to address the problem directly and fix it in under a minute.  The original class library was consumed by a desktop app, that's why I had the assertions in there in the first place but this native support will make using Assertions across the board a lot easier sell.  Yet another really nice feature of Whidbey!

Search

This Blog

Tags

Community

Archives

News

My other sites

Cool Stuff

Book Stuff

Security

ORM

Data Access

Funny Stuff

Compact Framework Stuff

Web Casts

My KnowledgeBase Articles

My MVP Profile

Design Patterns

Performance

Debugging

Remoting

My Fellow Authors

My Books

LINQ

Misc

Speech

Syndication

Email Notifications