浏览器链接无法正常工作VS 2013 Ultimate - 看起来SignalR无法正常工作?

时间:2016-01-28 17:38:36

标签: javascript asp.net angularjs visual-studio-2013 browser-link

我做了一个简单的ASP.net空项目。在一些Angular脚本和index.html中添加。

我的web.config如下

<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
  </system.web>

<appSettings>
  <add key="vs:EnableBrowserLink" value="true"/>
</appSettings>

<system.webServer>
  <modules runAllManagedModulesForAllRequests = "true" />
<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>
</system.webServer>

</configuration>

我在调试模式下运行并且禁用了刷新链接浏览器。 我右键单击查看源并查看注入的信号器脚本....

<!-- Visual Studio Browser Link -->
<script type="application/json" id="__browserLink_initializationData">
{"appName":"Internet Explorer","requestId":"b4525138f27448f4b328d597814217e0"}
</script>
<script type="text/javascript" src="http://localhost:4417/ecdc68cd047d49ad8af56a109101d4f7/browserLink" async="async"></script>
<!-- End Browser Link -->

然而,当我尝试在浏览器中运行信号器脚本文件的“http://localhost:4417 .....”链接时,它就不存在了。我应该看到一些javascript代码吗?

1 个答案:

答案 0 :(得分:0)

在Web.Config中添加标记

<appSettings> <add key="vs:EnableBrowserLink" value="false"/> </appSettings>