Upgrading .NET Framework of IIS Application Pool

You've just installed your new website in IIS server but it doesn't seems to render correctly or throwing an error and pointing you to this line in web.config

<compilation debug="true" targetframework="4.0">


Check your application pool, chances are, .NET Framework 4 is not yet installed. If your target framework is framework 2, then you can change that line to 2.0, as most IIS server default framework is using framework 2.0. Otherwise, you may need to install .NET framework 4. Follow that link to install  (http://www.microsoft.com/net/download/version-4).

After installation, run DOS in administrator mode, then dig to the specific framework directory and type the following (aspnet_regiis.exe -ir) as seen on this snapshot, to register and install it in IIS without affecting your IIS installation and current configuration.




Open up your IIS manager, then change your website application pool to corresponding framework version. In this case, it's .NET Framework v4.0.30319.

No comments:

Post a Comment