If you use Microsoft IIS 6, make sure that ASP.NET v2.0.50727 is set to . For this, check the Web Service Extensions page, and click if this extension was set to Prohibited. On 64-bits Microsoft Windows, select either the 32-bit or 64-bit version of ASP.NET v2.0.50727 depending on whether Microsoft IIS is running in 32-bits or 64-bits mode.

In some cases version 2.0.50727 is not available in Microsoft IIS, even though Microsoft .NET Framework 2.0 has been installed correctly. This can be corrected by using the ASP.NET IIS Registration Tool (aspnet_regiis.exe), which is installed with Microsoft .NET Framework 2.0. Depending on whether the Microsoft Windows version is 32bit of 64bit, aspnet_regiis.exe can be found in the folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727, or C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727.
For more information on the ASP.NET IIS Registration Tool, refer to the Microsoft documentation at MSDN.
Example
Using aspnet_regiis.exe with -i key, installs the version of ASP.NET that is associated with aspnet_regiis.exe and updates the script maps at the IIS metabase root and below. Only the script maps for applications that use an earlier version of ASP.NET are updated. Applications that use a later version are not affected.
Note
Although in most cases this will resolve the issue, care should be taken and the above referred Microsoft documentation should always be consulted.