【问题标题】:Browser link not working VS 2013 Ultimate - seems like SignalR is not working?浏览器链接不工作 VS 2013 Ultimate - 似乎 SignalR 不工作?
【发布时间】:2016-05-06 05:28:28
【问题描述】:

我做了一个简单的 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 代码吗?

【问题讨论】:

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


    【解决方案1】:

    在Web.Config中添加标签

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

    【讨论】:

    • 欢迎来到 Stack Overflow!为您的答案添加解释会对您有所帮助。为什么应该将此键设置为 false 而不是 true,因为 OP 当前拥有它?钥匙有什么作用?
    猜你喜欢
    • 2016-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-11
    • 1970-01-01
    相关资源
    最近更新 更多