Address both x86 and x64 versions of .NET with AppCmd.exe. When administering an IIS web server you frequently have to use AppCmd.exe to make configuration changes. Whether it is for a specific web site or server wide. Some think AppCmd is very limited, but here is how you can target multiple ASP.NET versions with AppCmd!
In this post you learn how to use AppCmd.exe as your IIS Swiss Army Knife to target multiple ASP.NET versions.
Read why I call AppCmd.exe your Swiss Army Knife for IIS management.
How to target multiple ASP.NET versions with AppCmd?
Most of us already know there are two versions of AppCmd available, one is located in c:\windows\syswow64\inetsrv\appcmd.exe and the other in c:\windows\system32\inetsrv\appcmd.exe
These address either 64-bit and 32-bit.
But what for different ASP.NET Framework versions? There is a parameter available! Yes, you can target multiple ASP.NET versions with AppCmd!
AppCmd .NET Framework version parameter
AppCmd.exe recognizes the parameter /clr. CLR stands for Common Language Runtime. By adding /clr to your command, you can address different Framework versions. For example, /clr:4 addresses the ASP.NET 4.0 and 4.5 configuration runtime, and /clr:2 addresses ASP.NET 2.0 (3.5).
How to: Determine installed .NET Framework versions
Summary
- Use AppCmd.exe to manage both x86 and x64 versions of .NET on an IIS web server.
- AppCmd is versatile and can target multiple ASP.NET versions with the right parameters.
- The command /clr allows you to specify different .NET Framework versions when using AppCmd.
- For instance, /clr:4 targets ASP.NET 4.0 and 4.5, while /clr:2 addresses ASP.NET 2.0 (3.5).
1 thought on “Target multiple ASP.NET versions with AppCmd.exe”