I have been working on a website to aggregate funny technology related content across the internet. So far, I have been able to integrate pictures, YouTube videos, and some RSS content from fmylife and clientcopia

I have created the site using ASP.NET and SQL Server. I made this decision solely because I use Microsoft’s platform every day for my professional work.

Picture Uploads and Thumbnails

The pictures page ( allows visitors to add their own pictures. Upon uploading a picture, a thumbnail is also generate for that picture. The code below shows how to create a thumbnail of an uploaded image.

public System.Drawing.Image CreateThumbnail(System.Drawing.Image original, int width, int height)
return original.GetThumbnailImage(width, height, null, new IntPtr());

Ajax using jquery + .NET Web Services

Recently, I have also been introducing some new ajax functionality using jquery and .NET web services. This combination has allowed me to easily introduce a “preview” feature for uploading images and YouTube videos.

Content Management

Youtube Videos

The site is being updated to use the Youtube play list as the content manager for the videos page. Comments and ratings will be retrieved for the detail page and visitors to can add their own comments and ratings.

Performance and Load Testing with WebLoad

Recently, I had to perform a load test on our new project. We are using WebLoad to test the performance at different levels of load to see how it holds up. While WebLoad offers its own set of analytics, I am also using perfmon to see how each tier is performing under the stress.

I originally planned on using WebLoad 8.4 for the performance testing but have decided to stick with version 8.1. The free license for 8.4 limits you to 10 virtual users (the load size) where as V8.1 does not have any limitation.

WebLoad 8.1 can be downloaded here.

Perfmon Counters

The following counters will give the most pertinent results.

  • Requests Queued
  • Requests Current
  • Request Execution Time (lower is better)
  • Request Wait Time (lower is better)
  • Requests Rejected (lower is better, is best)


  • Context Switches / sec


  • Pages / sec
  • Available Bytes
  • Committed Bytes


  • % Processor Time
  • Active Server Pages
  • Request Wait Time
  • Requests Queued

Web Service

  • Current Connections
  • Bytes Send / sec
  • Connection Attempts / sec
  • Current Blocked Async I/O Requests
  • Current Blocked bandwidth bytes

Adventures in WCF (Windows Communication Foundation)

My latest project at work has me working with WCF for the first time and it has been an interesting experience. Over the next few weeks, I will be discussing configuration, debugging, and deployment of the WCF service and connecting to it.

Microsoft provides a few tools that can help debug your WCF services.

Error Handling

Typically, I add Global.asax to a web application in ASP.NET and use the Application_Error event to handle any uncaught exceptions.

protected void Application_Error(object sender, EventArgs e)
//Insert your application’s exception logging here

This doesn’t work (still looking into why) for WCF services, even when hosted on IIS. A good work around is to wrap each service method with a try…catch block and calling the exception logger in the catch block.

public Object MyWcfWrapperMethod( int i )
//Call the method being exposed by WCF
catch( Exception e ){
//Log the exception
//do your clean up here


Unit tests are especially helpful (aren’t they always?) in the development of your WCF services as messages from errror and exceptions can (and will) be hidden by subsequent errors. An invalid parameter to a stored procedure call can result in a high level System.ServiceModel.CommunicationObjectFaultedException.