One of my favorite aspects of ORMs is that I no longer have to write SQL. I like this because I was never really good at it once it exceeded the joining of 2 tables. The really complicated queries I left with the SQL people or a DBA. Nonetheless, I still wanted to look at […]
Read More →Creating a W3WP Memory dump on Windows Server 2008 R2
On a web server with multiple application pools, there most likely will be multiple W3WP processes. Therefore, the first action to take when creating a memory dump of a W3WP worker process is to find which W3WP process you need to get the dump of. To do this, open IIS 7 and select the web […]
Read More →Web Farm Framework Architecture
I am very excited about the Web Farm Framework (WFF). Having administered many web farms in my past, this technology resolves a lot of the activities which where a burden. This blog will show a standard architectural configuration of a WFF environment. Figure 1 shows the controller server, the primary server and the multiple secondary […]
Read More →Enable and Activate Failed Request Tracing Rules
There is a new troubleshooting capability available in IIS 7, it is called Failed Request Tracing Rules. It provides a lot of very useful information which can help pinpoint the cause of performance problem or error. At the moment it is not installed by default and you may see the setting as shown in Figure […]
Read More →NHibernate MappingException could not compile mapping document
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
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 →Add images dynamically to WPF DataGrid using IValueConverter in C#
I created a WPF project which included a DataGrid which present a Status. It looked liked this. I didn’t really like the representation of the True, False, Null and decided to convert the value to either a Green, Yellow or Red image instead. To do this, I first added a class called BoolToImageConverter which implements […]
Read More →Access Localization Resources in WPF from the code-behind using C#
In a previous blog I discussed how to localize a WPF application. In that example we bound the localized resources in the XAML code. However, recently I needed to set the title of a MessageBox and I needed it to be localized. I added the below to my resource files. The name is the same […]
Read More →Setting the scrollbar for a treeview in WPF
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 →