2015-06-21 86 views
3

我想浏览器浏览器链接在Visual Studio中工作不

期间推出使用浏览器链接启用编辑操作我的web应用程序(asp.net MVC)调试模式,但实际上,当我尝试做到这一点(浏览器链接不工作,它让我在注册Web.config文件中的页面检查器)

enter image description here


编辑

,当我添加以下web.config中什么也没有发生

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

我仍然无法看到任何浏览器通过浏览器链接

明知我已启用debug=true连接在web.config中

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

并知道我已卸载网络必备软件包

enter image description here

回答

0

添加在你的web.config以下:

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

谢谢,我试图做到这一点,但没有显示浏览器连接到浏览器链接,请参阅更新后的文章 – Loai

+0

您的项目是否在.Net 4或更高版本下运行? – Ala

+0

我的应用程序在.Net 4.6下运行 – Loai

0

我发现this后非常有用的。

<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>元素可能已经存在。

相关问题