How to change website's ASP.Net runtime version to 4.0?
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.
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.
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”'
Open command window, change direcotry to C:\Windows\Microsoft.NET\Framework\v4.0.30319,
execute command aspnet_regiis.exe -norestart -s "W3SVC/<SiteID>/root".
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.