I have a iis server with displaying a root website and applicationpool setup to run on runtime 2.0. still the application pool uses asp.net 4.0 to compile and display the website. we found this by creating an empty website only requesting the .net runtime and configuration path. if i configure the website and application pool exacly the same on a differend server the website runs in 2.0 mode.
I have 2 windows 2008 R2 Service pack 1 servers with IIS 7.5. the following .net versions are installed on both servers 2.0 3.5 4.0 4.5. on both servers aspnet regiis shows the following:
aspnet_regiis -lv
2.0.50727.0 C:\Windows\Microsoft.NET\Framework64\v2.0.5072\aspnet_isapi.dll
4.0.30319.0 C:\Windows\Microsoft.NET\Framework64\v4.0.3031\aspnet_isapi.dll
2.0.50727.0 C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
4.0.30319.0 C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
i have run aspnet_regiis -i on the server not willing to run 2.0 we have compaired almost every iis setting but could not find any differences. is there anybody who nows how to make iis run asp.net 2.0 again?
Steps taken:
- did a file compare on applicationHost.config and made not working config file as much as possible same to working file
- Compared all found documented registry settings for iis and asp.net
- reregistered asp.net 2.0 and 4.0
- Uninstalled .net 4.5.1(this made the 2.0 application work) and installed it again(2.0 applications run under 4.0 again)
Differences found: Change .Net Framework version om server configuration in iis is on v4.0.30319 on not working version. on working version this is v2.0.50727. changing this to v2.0.50727 will be undone after iisreset.
edit: just to showing the basic configuration: