In the past, I've often needed to retrieve a current user object in the beginning of an action, and then use that object in updates to the model.

I've discovered a method that allows me to do this a little cleaner utilizing ASP.NET MVC ActionFilter Attributes.

more

I was working on an Outlook add-in that was making use of WPF User Controls hosted in an ElementHost within a Windows Form.. On all of my development and testing machines, the code worked fine, but on one of our notebooks with Windows XP SP3.. the window rendered as a black box only.

more

Google announced today their new plugin for Internet Explorer, which will enable websites containing a special meta tag to be rendered using Chromes' rendering engine instead of Internet Explorer's. more

Found a good jQuery watermark plugin that actually works.. more

I am working on a large Java project that utilizes JSF and Facelets, and am learning a bit more about how they work. I am using a template that is shared by all pages on the site, which also includes JavaScript files required by almost all pages on the site. I was looking for a clean way to exclude the base JavaScript files on the few pages that didn't require them, and this is what I came up with. more

I have been using Virtual PC 2007 for a while now and decided to download and try the new Windows Virtual PC RC. Once I loaded up my old Windows XP VM for development, I found that the Integration Features would not work. I had built a product release on my VM, but couldn't copy it over to my main machine - the clipboard wasn't working properly between machines. This post describes briefly what I did to get it to work.. more

I was recently working on a WPF User Control which made use of a ScrollViewer, but I found that the scrollbars were hogging too much space in my control. I wanted to modify the scrollbars to be a little bit narrower. Because of the way WPF was designed, you can create ControlTemplates to change the default look and feel of controls. more

I was writing a generic function that would non-uniformly randomly select an item from a weighted list. I wanted to re-use the same code in several parts of the system that used different object types. Accordingly, I decided to define the function using generic types. ... more

I had previously created a blog post with a sample project that demonstrated some basic use of the DataTemplate in WPF. I have seen some pretty slick WPF apps (blu is a nice one), and I wanted to try and see how hard it would be to improve the demo and the DataTemplate with an animation that would fade and ease in new elements to the list. more

I’ve been using WPF a bit more lately and had the need for a ratings control. After searching for a bit, I came across this one on Nicke Andersson's blog, which worked perfectly for the project I was working on. However, I was curious and wanted to extend it a bit... more

I’ve been learning a bit of WPF lately and found the DataTemplates to be very useful. I’ve put together a small example of how to use these to create a nice design for a list of objects. more

Unfortunately, objects instantiated from the Dictionary class can not be serialized to XML because it does not implement the IXmlSerializable interface. I will provide you with a couple of options to get around this problem. more

One interesting feature of C# is the ability to add extension methods to classes without altering the class itself. You could use this technique to add utility methods to built-in classes for use in your project. more

There are many articles that discuss using SAPI for command and control. i.e. Basically recognizing specific commands. However, there are not many articles that talk about doing Speech Recognition for dictation using SAPI. This post is a simple example to get you up and running using SAPI. more

I've been working on an Outlook Add-in, which uses a WCF client to connect to a web service. I created my service reference using the built-in Visual Studio tools, which places the service configuration in App.config. The service client worked fine for me on my Windows 7 box, but would not work properly on Vista or XP machines. more

I created a WCF service and was trying to deploy to a Server 2003 machine on IIS 6. The server was on my internal network and I wanted to test access to the service from my dev machine... so I set up my ASP.NET web application as usual, but when I navigated to my service in my browser from my dev machine, the URL used the machine name instead of the IP address...

more

This post shows how to create a nice, clean set of drop-down menus using html, css, and jQuery. This technique keeps the markup simple and works quite well for a site navigation bar. more

Gecode is a powerful set of libraries for solving constraint-based problems that is available for free. It's written in C++ and can be compiled with a wide range of compilers on many different systems. In this post I explain the configuration changes that I needed to perform to use the libraries in Visual Studio. more

I am working on an Office add-in and recently found a good method for deploying an add-in with custom prerequisites using ClickOnce. more

In my curiosity, I discovered a feature of Visual Studio that I had not come across before.
Everyone knows that you can view files in multiple panes so that you can view files side by side, but did you know that you can also view a single file in a split-view? more

Many developers have created programs, known as agents or bots, which connect to msn and allow users to chat with the agent. Microsoft is ending its support for creating agents using the Windows Live Agent SDK. Is it possible for a program to connect MSN without using the Windows Live Agent SDK? Yes, I’ll show you how to connect to MSN using the MSNP-Sharp API. more

This post goes over creating a simple data model using "M", a part of the upcoming Oslo SDK from Microsoft, and generating SQL to create a database representing the model. more

The ?: operator is commonly used and understood by developers, but what about the ?? operator. This article explains what this underused operator does and how it can be used to simplify your code. more

Suppose you want to serialize an object in your application to allow you to save it to a file or for some other reason. One option you have is to serialize it using .Net’s XML serialization support.
I’m going to give you another option using the SoapFormatter class. These same techniques will also work using the BinaryFormatter class. more

Learn how to convert a jar file into a dll so you can access a java library from your .Net application. more

Here's a short example that demonstrates dynamically compiling C# code that implements an interface, and making a call to the compiled instance. more

Recently I've been working more with the Crypto APIs in both .NET and Java and I have found that there aren't too many interesting examples to be found. I've created a sample that demonstrates a method to securely encrypt files using AES and store the encryption key in an RSA encrypted file, so that only someone with the private key X509Certificate can decrypt the file. more

I was trying to find the GeoCode of a location using the MapPoint Web Services with my C# application and found the documentation to be lacking. more

Welcome to our new blog.

This site is intended as a way for us to get more involved with the software development community, to facilitate sharing knowledge, and hopefully to help us and the community to improve the quality of the software that we build.

We intend to blog about interesting problems that we come across and possibly, the interesting solutions as well.

We'll also likely blog about anything else that we are interested in and think is worth sharing. more