Exception Management Block

I was sitting at work fixing all the bugs introduced in my code due to a zero-hour overhaul of the database, when my favorite MCS employee shows up (Josh W). So since he's there, I gladly pick his brain on how to setup the Exception Management block to use an application specific event source. I had had problems when I initially set it up, and it was publishing using the default event source.

For those of you unfamiliar with the Exception Management Application Block, it's P&P's swag at standardizing publishing errors in a consistent way throughout your all of your errors/exceptions... For instance, I publish to the event log, and then pass a string back to the user telling them to note the day/time of the error - and to tell me. But eventually I'll create my own publisher that emails me the info - as well as drops into the event log.

NOTE: If you publish your errors to a log other than the Application Log, and you happen to use MOM in your org - your errors won't be collected by MOM without creating a plug-in/snap-in/or whatever.

Turns out that you need to *add a registry key and string* to create the event source. Then point to it with your web.config <exceptionManagement />section (which I had commented out because it didn't work for me... probably because I didn't have the reg-key/string combo as noted above). I'll update this tomorrow from work with the specific reg key/string combo... as well as the whole of the web.config changes.

<configSection>
     <section> name="exceptionManagement" type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerHandler,Microsoft.ApplicationBlocks.ExceptionManagement" />
</configSection>

<exceptionManagement mode="on">
     <publisher assembly="Microsoft.ApplicationBlocks.ExceptionManagement" type="Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher" logname="Application" applicationName"My App Name" />
</exceptionManagement>

This code block will give you the settings you need to publish any errors to the Application Event Log with the "My App Name" listed as the event source - but you are not done yet! You have to create the event source:

\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\EventLog\Application

Add your own key (eg. "My App Name") here, then add a string called "EventMessageFile" to your key with the value of "C:\Windows\Microsoft.NET\Framework\v1.1.4322\EventLogMessages.dll". This entry will create the event source that you referenced in your web.config.

"If pride is absent, I'll take fear."

Mini-Microsoft had this to say about the recent Microsoft demo failure at CES:

Without consequences for failure, Microsoft product development see crap accepted as the very public norm and continue creating product that meet those expectations. How is it for all this Engineering Excellence that's been inflicted upon us we still achieve this mere modicum of mediocrity?

I'd expect BillG (or any embarrassed executive) to storm back to Redmond riding a roiling swirl of fire and brimstone and start firing such underperformers. And just when such just firings are revealed, you'd bet some folks will pull their fingers back from the keyboard and whisper "Holy Shit!" And rather than checking in their code to let testing find the bugs that round out the feature, they'll decide it's time to do a bit more of their own testing and write a few more automation and unit tests. And to dogfood a bit more intensely.

You know what: he's right! Why isn't their more accountability at Microsoft? Sure, many of their engineers are really smart... but for cripes sake: cut loose the dead wood. Then hire the best of the best from the extra 12,000 employees coming on board in Redmond. I'm not ready yet... but I will be. ;)

Scoblephone Loaded with Jewel Master by PDAMill...

... and Astraware's PopCap Game Pack with Bejeweled will be loaded soon. I'm still looking for Hexxagon for my Smartphone, but no one even knows what I'm talking about. I've been struggling with figuring out how to use this phone.

For starters AT&T Wireless is falling apart at the seems (so no one there has a clue). Their website has been neglected and in some cases redirects you to Cingular (even if you CAN'T use Cingular's service - as is the case with the Scoblephone). But what really bugs me about my Scoblephone - is that it took me days to find the volume! At times games seemed too loud, even though the ringtone seemed too low. But Microsoft in their infinite wisdom decided that the volume switch would affect earphone volume *ONLY*. If you don't know, here's a tip: MAIN system volume is controlled in 6 or 7 settings in the phones active PROFILE. Profiles are apparently designed to be this handy, dandy thing that allows you to change the behavior of the phone for any scenario you might encounter - such as Meeting, Movie, Normal, or Silent. You can configure your own - as I replaced Silent with Gaming. I figured I'd up the volume for when I play my puzzle games. Unfortunately, at least with PDAMill's Jewel Master, games appear to ignore the profile and any of its volume settings.

And don't get me started with how hard it was to load this game on the phone. First I found that PocketMac (a third party app because Microsoft is to short-sighted to create an OS X ActiveSync) would push the installer exe (something OS X can't read) over to the phone, but Smartphone 2003 SE wouldn't even read the EXE - saying that it's not compatible with this phone or some crap. Turns out I had to "install" the app on my Windows box, and then copy the CAB that it extracted back over to my mac to be sync'd to my phone. You may be thinking why I didn't just sync my phone on the windows box. Good question! For some reason the ActiveSync for Smartphone caused a conflict with my ActiveSync for PPC... which lead to it not even seeing the phone. Or maybe the PocketMac stuff prevented the phone from seeing the machine? I don't know.

Finally I wanted to setup my preferred ringtone (Axel Foley - you know the Beverly Hills Cop riff). So I located a free midi online, and copied it over to my phone in the My Sounds directory. But when I attempted to switch my ringtone (in the sound settings area that curiously has no main volume setting), the midi's weren't listed. What gives? So I spent the next 10 minutes tracking down the directory where the ringtones were (/windows). Once I found that, I moved my midi's over... and bam! I was able to switch my ringtones. Sweet. But don't celebrate just yet! When I headed over to Check's house for game night, my Scoblephone had conveniently deleted these *un-blessed* files. No more ringtone for me. Poof. Gone.

What gives? Isn't this supposed to be a Smartphone? Of course, I could be horribly wrong. Their may be some crazy key combo to force the volume rocker to work for the phone itself, as well as prevent random deletions of your ringtones... and maybe, just maybe Microsoft will wake up and use it's MacBU to create a better experience over on the Mac. And I'm not talking about the MSN *EXPERIENCE* either!

«January»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
303112345