Share via


Page Inspector Error Messages

 

This document describes problems that can occur when you use Page Inspector. These issues are displayed when you click the Problems tab.

Problems

System Requirements

Page Inspector shows missing system requirements in the Problems window.

Warning

In these cases, Page Inspector will not work at all.

Error

Internet Explorer 9 or later must be installed

Fix

Download Internet Explorer 9 from the Internet Explorer Download page.

Error

Internet Explorer Enhanced Security Configuration must be disabled

Fix

Disable the Internet Explorer Enhanced Security Configuration as described in the article Internet Explorer: Enhanced Security Configuration on the TechNet website.

Server Code Mapping Requirements

Warning

If any of the following requirements are not met, Page Inspector will work, but with downgraded functionality.

Error

Debugging must be enabled in the Web.config file or the "PageInspector:ServerCodeMappingSupport" application setting must be set to "Enabled"

Description

Page Inspector has to be enabled for the current Web project before it can open files in source view. When it is not enabled, tags and CSS elements still map from the Page Inspector browser window to the Page Inspector HTML and CSS tabs. However, you cannot open files in source view.

You can enable or disable Page Inspector in these ways:

  • If the computer’s Machine.config file contains <deployment retail="true"/>, Page Inspector will never open files in source view.

  • If the retail attribute is not set to true in the Machine.config file, the following application setting in the project’s Web.config file will determine whether files are opened in source view.

    <add key="PageInspector:ServerCodeMappingSupport" value="Enabled"/>

  • If the previous configuration settings have not been made, Page Inspector opens files in source view only when debugging is enabled for the Web project.

Cause

Possible problems:

  1. The computer’s Machine.config file has the deployment flag set to retail.

  2. The Web.config file is missing.

  3. The PageInspector:ServerCodeMappingSupport application setting is missing in the Web.config file.

  4. The PageInspector:ServerCodeMappingSupport application setting is there, but the value is not set to Enabled.

  5. Debugging is not enabled for the current Web project.

Fix

Automatic Fix

  •    Click the Fix it link next to the error description. This enables debugging by setting the debug flag to true.

    Note

    If the Machine.config file has the setting deployment="retail", this option is not available.

Manual fix 1: Enable debugging

  1. Make sure that the project has a Web.config file.

  2. Verify that the Web.config file contains the following setting in the <compilation> element:

    <system.web>

       <compilation debug="true" />

       <!-- etc. -->

    </system.web>

Manual fix 2: Add an application setting

  1. Make sure that the project has a Web.config file.

  2. Verify that the Web.config file contains the following setting in the <appSettings> element:

    <configuration>

       <appSettings>

          <add key="VisualStudioDesignTime:Enabled" value="true" />

          <!-- etc. -->

       <appSettings>

    </configuration>

Error

Page Inspector assemblies must be installed in the global assembly cache (GAC)

Description

The Page Inspector assemblies are not in the global assembly cache (GAC).

Fix

Reinstall Microsoft Web Tooling Extensions using these steps:

  1. Close Microsoft Visual Studio 2012 or Microsoft Visual Studio Express 2012 for Web.

  2. Open the Windows Control Panel.

  3. Under Programs and Features, click Uninstall or change a program.

  4. Click Microsoft Web Tooling Extensions – Visual Studio 2012.

  5. Click Repair and follow the prompts.

Error

Development server must be running .NET Framework version 4 or later

Description

Page Inspector has a dependency on the .NET Framework 4, and most of the features won’t work if your application targets an older version. The application is running the .NET Framework 3.5 or an earlier version of the runtime.

Fix

Retarget your project to use the .NET Framework 4 or above.

For more information, see How to: Upgrade Projects Created in Earlier Versions of Visual Studio and Migration Guide to the .NET Framework 4.

Error

Project must use Razor v2 or later

Description

Page Inspector can’t map to projects that are built using ASP.NET MVC 3 or earlier, or Web Pages version 1 (pages that use earlier versions of Razor syntax).

Fix

ASP.NET MVC 3 project:

  • Migrate your MVC 3 project to MVC 4 or a later release.

Web Pages project:

  • Migrate the application to use Web Pages version 2 or a later release.

Error

Page Inspector's Runtime must be registered in root web.config

Description

The Page Inspector assembly is not registered. As a result, Page Inspector is unable to open files in source view to show where a selected element maps to.

Fix

Reinstall Microsoft Web Tooling Extensions as described in the steps for Page Inspector assemblies must be installed in the global assembly cache (GAC).

Error

No mapping data was returned from the server

Description

Page Inspector can’t map between the browser and source code.

Cause

Not determined.

Fix

No specific recommendations.

Error

URL must map to a project in the current solution

Description

Page Inspector can map to source code only if the page in the browser belongs to a project in the solution.

Fix

Navigate to a page belonging to any project in your solution.

Disclaimer

This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred.

© 2012 Microsoft Corporation. All rights reserved.

Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.