(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…)