signalr

SignalR CORS on Azure Mobile Services Web Api

安稳与你 提交于 2020-01-30 08:11:51
问题 I have an Azure Mobile Service running Web Api and c# and enabled CORS as suggested in Enable CORS on Azure Mobile Serivce .NET Backend however I have now come to add SignalR into the mix. SignalR is working fine however I can't see to find how to enable CORS. At present in my test app config I have the following: //enable CORS for WebAPI var cors = new EnableCorsAttribute("*", "*", "*"); httpconfig.EnableCors(cors); //rather than use the static method new up SignalRExtensionConfig and pass

How to use shared SignalR Hub from different hosted project in ASP.NET Core 2.2

末鹿安然 提交于 2020-01-30 07:54:08
问题 The bounty expires in 4 days . Answers to this question are eligible for a +50 reputation bounty. Div wants to draw more attention to this question. I'm working with a project built with ASP.NET Core 2.2. The main solution contains multiple projects, which includes API, web and other class libraries. We've used SignalR to displaying shared messages/notifications between the API project and the web project. For example, adding a new employee record from an API should call SignalR Hub and all

SignalR 2.2 returns 404 Not Found on IIS 8.5

房东的猫 提交于 2020-01-25 23:55:42
问题 I've publish my Web-Api2 on a development server (Windows 2012 Server and IIS8.5). I've added the Websockets Protocol role, and also went through the steps in this answer to make sure everything is set up on my side. The app is running under `Default Web Site'. However, I'm still getting this error: Microsoft.AspNet.SignalR.Client.HttpClientException: StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Date: Fri, 15 Jul 2016 09:18:54

SignalR 2.2 returns 404 Not Found on IIS 8.5

僤鯓⒐⒋嵵緔 提交于 2020-01-25 23:55:18
问题 I've publish my Web-Api2 on a development server (Windows 2012 Server and IIS8.5). I've added the Websockets Protocol role, and also went through the steps in this answer to make sure everything is set up on my side. The app is running under `Default Web Site'. However, I'm still getting this error: Microsoft.AspNet.SignalR.Client.HttpClientException: StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Date: Fri, 15 Jul 2016 09:18:54

ABP理论学习之SignalR集成

荒凉一梦 提交于 2020-01-25 23:47:29
返回总目录 本篇目录 介绍 安装 建立连接 内置功能 你自己的SignaR代码 介绍 Abp.Web.SignalR 使得在基于ABP的应用程序中使用 SignalR 相当容易。查看 SignalR文档 获取更多关于SignalR的详细信息。 安装 服务端 将 Abp.Web.SignalR nuget包安装到你的项目中(一般是web层),然后给你的模块添加一个依赖: [DependsOn(typeof(AbpWebSignalRModule))] public class YourProjectWebModule : AbpModule { //... } 然后在你的OWIN Startup类中使用 MapSignalR 方法: [assembly: OwinStartup(typeof(Startup))] namespace MyProject.Web { public class Startup { public void Configuration(IAppBuilder app) { app.MapSignalR(); //... } } } 注意:Abp.Web.SignalR只依赖于Microsoft.AspNet.SignalR.Core包。因此,如果你之前没有安装,那么你也需要将 Microsoft.AspNet.SignalR 安装到你的web项目中。 客户端

asp.net 空web窗体使用SignalR

别等时光非礼了梦想. 提交于 2020-01-25 22:07:44
首先参考官方教程链接: https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr 上述的hub类,start类,均是添加找到上述类来进行添加,不是手动添加一个普通类 再次参考教程链接: https://www.cnblogs.com/dathlin/p/9026680.html 测试的代码链接: ---------------------------------------------------------转载的博客----------------------------------------------------------------------------------------------- 本文主要是我在刚开始学习 SignalR 的技术总结,网上找的学习方法和例子大多只是翻译了官方给的一个例子,并没有给出其他一些经典情况的示例,所以才有了本文总结,我在实现推送简单的数据后,就想到了如何去推送复杂的数据,以及推送一个实时的图表数据,文本为我原创,转载请注明出处:Richard.Hu,先上一堆乱七八糟的说明先: SignalR 的官方地址是: https://www.asp.net/signalr

SignalR and RequireJS : client methods undefined

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-25 10:33:46
问题 I am trying to use SignalR (1.3) with RequireJS. My requireJs shim contains : "signalr.core": { deps: ["jquery"], exports: "$.connection" }, "signalr.hubs": { deps: ["signalr.core"], exports: "$.connection" }, I have a module : define(["jquery", "signalr.hubs"], function ($) { var Test = {}; Test.Init = function () { //Code init $.connection.myHub.client.ClientMethod = function () { console.log("Hello"); }; }; Test.Start = function () { return $.connection.hubs.start(); }; return Test; }); I

Cannot read text from .net core signalr server using Single Read Sampler in Jmeter

被刻印的时光 ゝ 提交于 2020-01-25 05:25:26
问题 I am trying to load test our web app which is a real time gaming app written using code using asp.net core and signalr technology. We are using JMeter WebSocket Samplers by Peter Doornbosch for websocket communication.But we are not able to get any messages from the signalr server(except the ping frames from the websocket layer). The text message I am trying to read is a broadcast from server to all connected clients, so I can see that the message has been received by the browser clients but

How to create Login Session Timer for individual users

不问归期 提交于 2020-01-25 04:53:28
问题 I've been working on this custom timer I created for each user's login session . Until now I was'nt able to make an individual timers for each login session. Scenario: When User1 logs in, the timer will start counting . When User2 logs in, the timer of Use1 will reset the value is same as the timer for User2. It seems that they have one timer (not individual). Here is what I want to happen. when user1 logs in, his timer will start counting. if the timer reach 900 seconds(15 minutes) it will

Can't see SignalR traffic in browser development tools

血红的双手。 提交于 2020-01-24 11:15:48
问题 I built server and client code that uses SignalR. The website is working perfectly, but I can't see the web traffic in any browser (chrome, IE, Firefox). I know the web traffic is there because the website is working. Is there a way to view SignalR Traffic in a browser? If not what is the best external tool for viewing SignalR traffic? 回答1: you can use Fiddler, see this article : https://github.com/SignalR/SignalR/wiki/Using-fiddler-with-signalr 来源: https://stackoverflow.com/questions