How To Switch Website To ASP.NET4.0 in Windows Server 2003 IIS6.0

Question:

How to change website's ASP.Net runtime version to 4.0?

Sulution:

Method 1: Changing in IIS6.0 Manager (Requiring Restart IIS)

In IIS6.0, open the website's properties window. Select ASP.NET tab. Select '4.0.xxx' for ASP.NET Version:



Click OK. You'll be prompted with confirm window.



After click Yes, restart IIS by runnint “C:\> iisrset” in command window.

Method 2: Chagning with Script (Without IIS restart requirement)

I prefer this method, because it doesn't require restart IIS. So all other websites will not be affected. The down side is that it's a bit tricky. It takes website or virutal application's virtual path as parameter to identity them.

Step 1) Get Site's Virtual Path

In IIS6.0 each web site can be uniquely identified by its site ID. You can find then in Internet Information Services(IIS) Manager. After open IIS Manager, expend node with server name, click Web Sites.In the right pane, Idnentifier column contains each website's ID. Website's virutal path in IIS6.0 takes the form of “/W3SVC/<SiteID>/Root”'

Step 2) Excute Command

Open command window, change direcotry to C:\Windows\Microsoft.NET\Framework\v4.0.30319,
execute command aspnet_regiis.exe -norestart -s "W3SVC/<SiteID>/root".

Finally

IIS6.0 application pools do NOT allow mixed .Net Framework. No matter which method you used to upgrade your websites to ASP.Net4.0, put the upgraded website into application pools dedicated to ASP.Net4.0 websites.

Resources:

http://www.asp.net/learn/whitepapers/aspnet4
http://www.byteblocks.com/

Navigator

Other Knowledgebase Articles

Basic Windows Hosting

# of Domains: 4
# of SQL Server Databases: 4
Disk Space: 50GB
Bandwidth: Unmetered
SQL Server 2016
Monthly: $4.99
More Information About Free Shared Windows Hosting Plan

Express Hyper-V Hosting

Dedicated Memory:2GB
Disk Space: 120GB
Bandwidth: Unmetered
Windows 2016/2012: Free
Monthly: $11.99
More Information About Express Windows Hyper-V Server

Dedicated Windows Server

CPU: Quad-Core X3440 CPU
RAM: 16GB RAM
Disk: 2x120GB SSD + 300GB SATA
RAID: RAID 1
Bandwidth: Unmetered
Windows 2016/2012: Free
Monthly: $79.00
More Information About Dedicated Windows Server with SSD
Kubernetes Hosting | Windows VPS Hosting | SQL Server Hosting | ASP.NET Hosting | Windows Hyper-V Hosting | Dedicated SQL Server Hosting | Dedicated Windows Hosting | DNN Hosting
Cloud Application Hosting | MongoDB Hosting | CockroachDB Hosting | MySQL Hosting | MariaDB Hosting | Wordpress Hosting | Magento Hosting | Drupal Hosting | PostgreSQL Hosting | OpenCart Hosting | Redis Hosting | SQL Server Cloud Hosting