ASP.NET Worker Process Renamed in Windows Vista

August 15, 2009

So apparently the aspnet worker process has been renamed to w3wp.exe on Windows Vista. I hate this operating system more and more each day.


Configuring WCF on IIS 7.0 on Windows Vista

August 15, 2009

First of all, I want to say I hate Vista.

Ok, so this was my first experience using IIS 7.0 on Windows Vista for some local development and ohmigosh; what a pain. I am trying to test some WCF services and I needed to be able to debug. When attempting to view one of my services just to ensure it could be found, I received the following error:

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

I mean it makes sense right; why on Earth would you expect IIS 7.0 to be able to understand a svc file!?!

Luckily I found a solution to this problem from Rahul’s Blog on MSDN on how to fix the problem. The basic steps are:

  1. Open a new command prompt
  2. Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation
  3. Execute servicemodelreg –i

After that, try navigating to your service again and it should work. Thanks again Rahul for this helpful tip!


How to Only Allow Numbers in A TextBox

October 13, 2008

I came across a problem the other day. I was working on a ASP.NET application written on the .NET 1.1 Framework and I need to restrict two text box controls to only allow numbers. Being written for 1.1, I did not have access to the slick AJAX Control Toolkit which I could had easily thrown on a extender to force only numbers, thus I had to resort to good old JavaScript!

There actually were lots of examples of doing this on the Internet, but it was challenging to find one that worked period or would work in multiple browsers! Finally, after doing extensive searches and tweaks, here is the final function I used to restrict a text box to only accept numbers:

Javascript Function

// A function that only allows numbers to be typed into a text field.
function NumberValidation(event)
var charCode = (event.which) ? event.which : event.keyCode;

return !(charCode > 31 && (charCode < 48 || charCode > 57));


<asp:TextBox ID="PageSize" Runat="server" style="width:30px;" MaxLength="3" OnKeyPress="return NumberValidation(event);"></asp:TextBox>

*Note: Even though Visual Studio will indicate you cannot have OnKeyPress in the aspx, you can still put it there and it will work.