asp.net-mvc SignalR 的这些轮询请求来自哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21508222/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 03:30:19  来源:igfitidea点击:

Where are these poll requests from SignalR coming from?

asp.net-mvcasp.net-mvc-4signalrdurandalsingle-page-application

提问by mehrandvd

I have a SPA application using Durandal.

我有一个使用 Durandal 的 SPA 应用程序。

My program starts to have a http request periodically:

我的程序开始定期发出 http 请求:

http://localhost:1551/f9750d8f8aa54265835e72d56d23144a/arterySignalR/poll?transport=longPolling&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAACM1YyjLngEiQsL54ET%2B%2FqwAAAAACAAAAAAADZgAAwAAAABAAAAAyZZfHz09psv64kIgPPwQNAAAAAASAAACgAAAAEAAAABMZImCidzdmb21ehxuGD4IoAAAAbazfW7CYR7y7HKb8JPt9ZH9b6fUDlZao60kBG662Vy%2Fb0IHwkwidthQAAAA1qSqnsCOheiNyXiINEyBPBAkqVg%3D%3D&messageId=d-79160814-B%2C0%7CC%2C4%7CD%2C0&requestUrl=http%3A%2F%2Flocalhost%3A2690%2F&browserName=Firefox&tid=5&_=1391326350868

I don't know where does it come from? As I remember I haven't added any reference to SignalR or something like.

我不知道它来自哪里?我记得我没有添加任何对 SignalR 或类似内容的引用。

How can I check what part of my code is generating this request? and then remove it maybe.

如何检查我的代码的哪一部分生成了此请求?然后删除它也许。

The technologies I'm using are:

我使用的技术是:

  • Durandal
  • ASP.NET MVC 4.0
  • Knockout
  • ASP.NET WebApi
  • 杜兰达尔
  • ASP.NET MVC 4.0
  • 昏死
  • ASP.NET WebApi

回答by Yaakov Ellis

This is coming from the browser linkfeature in Visual Studio 2013 in the Standard toolbar. It is code that allows Visual Studio to interact with browsers running the code, and should only show up when running it in debug mode.

这来自Visual Studio 2013 中标准工具栏中的浏览器链接功能。它是允许 Visual Studio 与运行代码的浏览器交互的代码,并且应该只在调试模式下运行时显示。

To disable it (until the fix to the issue is made live in an upcoming update), follow the directions in #4 of the msdn pageto disable it:

要禁用它(直到在即将到来的更新中修复该问题),请按照msdn 页面#4 中的说明禁用它:

  1. Uncheck "Enable Browser Link" in the Browser Link menu item
  2. Set appSetting "vs:EnableBrowserLink" to "false" in web.config or debug=false.
  1. 在浏览器链接菜单项中取消选中“启用浏览器链接”
  2. 在 web.config 或 debug=false 中将 appSetting "vs:EnableBrowserLink" 设置为 "false"。

Or you can just ignore it. It wont do any harm, will only happen locally, and should be fixed soon.

或者你可以忽略它。它不会造成任何伤害,只会在本地发生,并且应该尽快修复。

Also see this questionand this question.

另请参阅此问题此问题