Debugging Visual Studio 2005 project on 64-bit IIS 6 in Windows XP x64

If you are using Windows XP x64 and if you use Visual Studio 2005 to create a virtual directory on local 64-bit IIS as shown in the following screen shot:


and you may get an error message like this:

Unable to create the virtual directory. Configuring the virtual directory for ASP.NET 2.0 failed. You may need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly.


The root cause is that the application is 32-bit but IIS 6 on Windows XP x64 is 64-bit. You will need to enable 64-bit IIS to run 32-bit applications so that Visual Studio can create virtual directory on it. To confirm this, just launch a command prompt to run aspnet_regiis –i command, you should get output as follows:

The error indicates that IIS in in 64 bit mode, while this application is a 32 bit application and thus not compatible.

Follow the following steps to enable 64-bit IIS 6.0 to run 32-bit applications:

1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.

2. Type the following command:

cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true”

3.Press ENTER.

Microsoft TechNet reference:

Now you should be able to create virtual directory from Visual Studio 2005. If still not, then run aspnet_regiis –i again to make sure IIS is correctly configured.

Leave a Reply

Notify of