signalr

WebApi Application_Start will not fire until web page is loaded or SignalR request is made

为君一笑 提交于 2020-01-06 07:07:31
问题 I have WebApi OWIN hosted Web Server/Winforms Client application. Additionally I am using SignalR for client/server communication. When running under IIS Express while debugging Application_Start method in Global.asax.cs is executing just fine. On IIS 7.5 same code in Global.asax.cs will not execute when website is started in IIS Manager Application_Start only fires when I call it from a page http://localhost:7000/SignalR/hubs or Client sends SignalR request first time around and after that

SignalR Error 500 when calling server from client in ASP.NET 4.5 Website

本秂侑毒 提交于 2020-01-06 07:00:37
问题 I'm using SignalR with ASP.NET 4.5 webforms. I wasn't able to make the client talk to the server and vice versa. What I want to achieve is simply being able to to test how the Client can trigger a server function and how the server can trigger a client function. Here's the code I use: Client Side Code (HitCounter.aspx) <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="Scripts/jquery-1.8.2.js"></script> <script src="Scripts

SignalR/Angular: Failed to load“url”.Response to preflight request doesn't pass access control check.

旧城冷巷雨未停 提交于 2020-01-06 06:48:20
问题 I am trying to implement a simple notification system using SignalR for my server, and Angular for my client. When I run my angular application after starting my server, I receive this error: Failed to load http://localhost:1874/notify/negotiate: Response to preflight request doesn't pass access control check: The value of the 'Access- Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. Origin 'http://localhost:4200'

SignalR/Angular: Failed to load“url”.Response to preflight request doesn't pass access control check.

自作多情 提交于 2020-01-06 06:48:05
问题 I am trying to implement a simple notification system using SignalR for my server, and Angular for my client. When I run my angular application after starting my server, I receive this error: Failed to load http://localhost:1874/notify/negotiate: Response to preflight request doesn't pass access control check: The value of the 'Access- Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. Origin 'http://localhost:4200'

npm package for signalr client not getting connected

核能气质少年 提交于 2020-01-06 03:35:42
问题 Hi we need to run signalr client on console, are there any npm packages available. i've already tried this https://www.npmjs.com/package/signalr-client but it is not getting connected to server HUB. 回答1: There is an issue under "Known Issues" title. "client.Proxy settings currently only work for HTTP and not HTTPS". Alternatives https://www.npmjs.com/package/signalrjs 来源: https://stackoverflow.com/questions/31934632/npm-package-for-signalr-client-not-getting-connected

Not getting distributed/disparate Angular site to talk to SignalR in WebAPI

梦想与她 提交于 2020-01-06 02:45:07
问题 I very new to SignalR and I am trying to integrate it with an AngularJS site and WebAPI. I followed greate this example to begin with. However, as I mentioned, the website I am working on will live on a different server to the WebAPI project. In my dev environment I have set up a local site for Angular, hosted in IIS on localhost:60000/127.0.0.1:60000 and the WebAPI lives on localhost:31374 (in VS2013, using IIS Express.) This is to simulate the 2 different servers the projects will live on.

OnDisconnect and Logged on Users after recycle?

廉价感情. 提交于 2020-01-05 05:49:07
问题 I've read that OnDisconnect ( server side ) sometimes , can be bypassed ( application recycle etc). The OnDisconnected method doesn't get called in some scenarios, such as when a server goes down or the App Domain gets recycled. And so I ask : When a user connects , I generate him a token , keep it in the user cookie , and when OnConnect is called , I attach a connectionId with that token. (the same way where onDiconnect is called , I set a value in the dateDisconnected ) This will also

how to create a signalR hub proxy in javascript, having hubs in class library?

回眸只為那壹抹淺笑 提交于 2020-01-05 04:13:13
问题 currently, am working on chat application using signalR and agsxmpp library, I have seen many examples how to create a proxy of hub in javascript. however, my architecture is differ from these examples. I have class library and a web project(web forms) Hubs are written in class library, and java script exists in web project, I want to create proxy of hub(written in class library) in java script I have tried a lot. but couldn't find a solution. I have read owin(startup.cs) but still not a

SignalR: System.ObjectDisposedException with timer

时光毁灭记忆、已成空白 提交于 2020-01-05 04:07:06
问题 I'm playing with signalR and I want to send every 2s a little message to my clients. So I followed this tutorial, and it works good for chatting, now, I want to implement my timer. Then, I made this ( ASP.NET .NET Core 3.1 ): public ChatHub() { Debug.WriteLine("hello"); var timer1 = new Timer(); timer1.Elapsed += this.Timer1_Elapsed; timer1.Interval = 2000; timer1.Start(); } private async void Timer1_Elapsed(object sender, ElapsedEventArgs e) { Debug.WriteLine("tick"); await SendMessage("user

SignalR's $.hubConnection() is not a function

依然范特西╮ 提交于 2020-01-05 03:34:30
问题 Hi All i'm working on Implementing a SignalR Stock Ticker Using AngularJS based on an example over here. But i'm getting an error while connecting to signalr like this TypeError: $.hubConnection is not a function And this is where the error is showing: var initializeClient = function () { //Creating connection and proxy objects console.log("anil"); connection = $.hubConnection(); //console.log("anil.r"); proxy = connection.createHubProxy('stockTicker'); configureProxyClientFunctions(); start(