(User MapPath and FileStream Together)
A very common scenario we often run into is we need to log some information to a local text file on the web server. We know we can use all the health monitoring capabilities built in to asp.net for reasons like performance,
standards, best practices, etc., but sometimes, you just want to log something right now and you don’t want to spend a lot of time.
(more…)
One of the tricks I’ve learned over time is to always set visual studio to stop on a thrown exception. Normally, during running of a .net application, unhandled exceptions are simply processed and absorbed quietly. For the most part, this is good because you do not want your users to see error messages all the time, and likely what is being thrown is not interesting anyhow. It is however bad because throwing exceptions is very time consuming for the application as well as it may actually be something important.
To keep this from happening, my "best practice" is to go into the menu choice Debug/Exceptions as follows:

(more…)
First, Matthew MacDonald is one of my favorite technical authors so I was very happy to hear that he was writing a book on WPF. I’ve been a big fan of one of his other books (Pro ASP.NET 2.0 in C# 2005
) for many years. I use it like a bible. To cut to the chase, Matthew has done it again. Pro WPF, though doesn’t fit in your pocket very well since it’s 980 pages is great. It carefully explains topics in WPF that are not easy to explain. I have to say I did not understand dependency properties very well until I read that section and it really cleared things up for me.
(more…)