3

我正在尝试使用浏览器链接以调试模式启动我的 Web 应用程序(asp.net MVC)以在浏览器期间启用编辑操作

但实际上当我尝试这样做时(浏览器链接不起作用,它要求我在 Web.Config 中注册页面检查器)

在此处输入图像描述


编辑

当我将以下内容添加到 web.config 时,什么也没有发生

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

我仍然看不到任何浏览器通过浏览器链接连接

知道我debug=true在 web.config 中启用了

<compilation debug="true" targetFramework="4.6" />

并且知道我已经卸载了 Web Essentials 包

在此处输入图像描述

4

2 回答 2

0

在您的 web.config 中添加以下内容:

<appSettings>
    <add key="VisualStudioDesignTime:Enabled" value="true" />
    <add key="PageInspector:ServerCodeMappingSupport" value="Enabled"/>
 </appSettings>
于 2015-06-21T08:30:32.293 回答
0

我发现这篇文章非常有用。

<system.webServer>
  <handlers>
    <add name="Browser Link for HTML" path="*.html" verb="*"
         type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0,
               Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
         resourceType="File" preCondition="integratedMode" />
  </handlers>
  <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

请注意该<modules>元素可能已经存在。

于 2016-05-31T21:58:52.727 回答