Congfigure IIS to use later .net frameworks

2016/03/07

When IIS is first installed you will most probably get several errors when trying to launch your asp.net website.

This is more prevalent when your application needs a .net framework that is higher than the .net framework version supported by the IIS out of the box.

To fix these errors you need to follow the steps below:

1 – download and install the required .net framework version
2 – add asp.net features to IIS by:

i – open “turn windows features on/off” window from the control panel
ii – expand the IIS node
iii – expand the “world wide web” node
iv – expand “application development features” node
v – check the check box for “ASP.NET”

3 – register your newly installed .net framework to work with ISS:

i – when this was written, the tool that can do this is aspnet_regiis.exe. this file is shipped with the .net framework and located in the version folder.
ii – simply run this tool with the -i parameter to configure IIS to use this version of .net framework.
e.g. c:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_regiis.exe -i
you may want to use the Framework64 directory instead depending on the configuration of your computer and IIS. However, I just configured a 64 bit computer for IIS 7 with the normal version and it worked. Perhaps IIS 7 is working as an x86 application; let me know if not.

Note: you will also need to point your asp.net application pool to use the correct .net framework version by:
1 – click “application pools” in IIS manager
2 – select the relevant application pool and click on “basic settings” link on the action pane
3 – select the appropriate .net framework from the .net framework version drop-down.

P.S. some errors you may get are listed below (do comment if you come across other errors that get fixed this way):

  • Handler “ExtensionlessUrlHandler-Integrated-4.0” has a bad module “ManagedPipelineHandler” in its module list
  • The requested page cannot be accessed because the related configuration data for the page is invalid error

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: