Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net Visual Studio中的浏览器链接不工作_Asp.net_Asp.net Mvc_Visual Studio 2013_Browser Link - Fatal编程技术网

Asp.net Visual Studio中的浏览器链接不工作

Asp.net Visual Studio中的浏览器链接不工作,asp.net,asp.net-mvc,visual-studio-2013,browser-link,Asp.net,Asp.net Mvc,Visual Studio 2013,Browser Link,我正在尝试以调试模式启动我的web应用程序(asp.net MVC),使用浏览器链接来启用浏览器运行期间的编辑操作 但实际上,当我尝试这样做时(浏览器链接不起作用,它要求我在Web.Config中注册页面检查器) 编辑 当我将以下内容添加到web.config时,什么也没有发生 <add key="VisualStudioDesignTime:Enabled" value="true" /> <add key="PageInspector:ServerCodeMapping

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

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


编辑

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

<add key="VisualStudioDesignTime:Enabled" value="true" />
<add key="PageInspector:ServerCodeMappingSupport" value="Enabled"/>
并且知道我已经卸载了web essentials软件包


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

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

我发现这篇文章非常有用

<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>


请注意,
元素可能已经存在。

谢谢,我尝试过这样做,但没有显示浏览器连接到浏览器链接,请查看更新后的帖子。您的项目是否在.Net 4或更高版本下运行?我的应用程序在.Net 4.6下运行,您是否能够正常运行。面对同样的问题
<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>