Author: Benjamin Perkins

NHibernate MappingException could not compile mapping document

NHibernate Benjamin Perkins

This is a fairly common error message which a programmer will receive during the NHibernate mapping process. The inner exception was: {“persistent class NAMESPACE.CLASSNAME, NAMESPACE not found”} {“Could not compile the mapping document: NAMESPACE.CLASSNAME.hbm.xml”} The root cause of this error was that the class (class.cs) existed in the NAMESPACE.Common namespace and in my mapping file […]

Read More →

How to sort by month in SQL Server

Benjamin Perkins C#

This is a older blog which I am migrating, you can see how the older website looked like here. You can see on the Blog.Archive() navigation bar on the right of this page that I present the Year, Month and number of blogs which I have written each month. Everything worked fine from October 2010 […]

Read More →

Add a Masked Textbox control to a WPF program

I found some very creative and technically challenging examples for adding a masked textbox control to a WPF program. Most of them required the creation of a new class inherited from the base System.Windows.Controls.TextBox class. This is a valid option, however, I have implemented a different approach. I discovered the System.Windows.Forms.Integration.WindowsFormsHost class which is specifically […]

Read More →

Setting the scrollbar for a treeview in WPF

Benjamin Perkins C#

I wanted a treeviews max height to be about 15% smaller than the window hosting it. This was because I wasn’t able to get (could not get) the vertical scrollbar for the treeview to show up without setting the MaxHeight property. Statically setting the MaxHeight property did make the vertical scrollbar show up, however when […]

Read More →

Modifying IIS 6 log data in Windows 2003

IIS Benjamin Perkins

All IIS logging properties are not selected by default. Some of them, which are not selected by default can add some valuable information when troubleshooting performance or availability issues. To modify the properties which IIS 6 logs, first select the web site which you want to log and select properties as show in Figure 1. […]

Read More →

Setting up performance counters for ASP.NET

ASP.NET Benjamin Perkins

Troubleshooting a performance problem can be very complicated. Unfortunately, in many cases you prepare and begin learning about how to fix a performance problem when it is happening or just after a performance problem. The fact is, you need to monitor your system and gather statistics on what is considered “standard operating performance” before a […]

Read More →