FIX: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase

Author:

Anand Narayanaswamy MVP

COMMUNITY SOLUTIONS CONTENT DISCLAIMER

MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.

SUMMARY

In this article, you will learn how to fix an exception which occurs rarely with an ASP.NET 2.0 application.

SYMPTOMS

The HostingEnvironmentException error occurs when you attempts to run an ASP.NET 2.0 application.

CAUSE

The most probable cause for this error is that you must have installed Internet Information Services (IIS) after the installation of Microsoft .NET Framework 2.0.

RESOLUTION

Follow the steps given below to fix this error
 
(1) Go to Start | Control Panel | Add and Remove Programs
 
(2) Click on the entry titled Microsoft .NET Framework 2.0 and select Change/Remove. The Microsoft .NET Framework 2.0 Setup dialog box opens up.
 
(3) Select the option titled Repair and the setup automatically performs the required repair work.
 
(4) You will be prompted to reboot the system after the completion of the process.
 
(5) Run the affected ASP.NET 2.0 application once again and the application should work fine without any problems.
Properties

Article ID: 555583 - Last Review: 14 Feb 2017 - Revision: 1

Microsoft Internet Information Services 6.0

Feedback