signalr

Realtime notification not sent

点点圈 提交于 2019-12-11 03:52:08
问题 I am trying to display realtime notification in ASP.NET Boilerplate, but it is not sent. public override async Task<MessagesDto> Create(MessagesCreateDto input) { var MessagesCore = ObjectMapper.Map<MessagesCore>(input); MessagesCore.UserId = Convert.ToInt32(AbpSession.UserId); MessagesCore.CreationId = Convert.ToInt32(AbpSession.UserId); MessagesCore.FromUserId = Convert.ToInt32(AbpSession.UserId); MessagesCore.CreationTime = DateTime.Now; MessagesCore.LastModificationId = Convert.ToInt32

SignalR and SqlDependency refreshment issue - ASP.NET

≡放荡痞女 提交于 2019-12-11 03:47:54
问题 I have a table in MSSQL database, and I have an ASPX page, I need to push all new rows to the page in a descending order. I found this awesome tutorial which is using SignalR and SqlDependency and it shows only the last row descarding the previous rows which have been added when I'm online, it does that because it has a span element to show data and every time it overwrites this span, so I modified the JavaScript code to append the new data and it works fine. The problem now is when I

SignalR .NET Client Invoke throws an exception

狂风中的少年 提交于 2019-12-11 03:10:43
问题 I'm trying to get a console application working with the SignalR .Net Client but I'm getting an error when I try to invoke a method on the Hub. Here's my code for the console app: static void Main(string[] args) { var connection = new HubConnection("http://localhost/SignalRTest"); var myHub = connection.CreateProxy("SignalRTest.Classes.service"); myHub.On<string>("addMessage", text => { Console.WriteLine(text); }); connection.Start().ContinueWith(task => { if (task.IsFaulted) { Console

Error sending object to .net signalr client

六月ゝ 毕业季﹏ 提交于 2019-12-11 03:09:25
问题 My understanding is that with signalr I can just send objects back and forth. I am trying to set up a .net client to receive notifications that orders have been placed on a web site. I am trying to set up a very simple example so that I understand the concepts. It works great when I am sending a string notification back to the client, but when I try to send an object I get an error: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException was unhandled by user code HResult=-2146233088 Message

SignalR: Concurrent connections on Windows 7

旧城冷巷雨未停 提交于 2019-12-11 02:51:55
问题 I have a self-hosted WebAPI which uses SignalR. The process is running on a client OS (Windows 7). Let's assume most clients fall back to long-polling. How many clients can I roughly have? I'm asking because I read Microsoft keeps concurrent connections artificially low on client OS (the article is about IIS though)... In this regard does it matter whether or not clients are using long-polling or WebSockets? 回答1: I don't have a definitive answer regarding request limits for self-hosting on

Call .fail(error) without throwing exception

不问归期 提交于 2019-12-11 02:46:13
问题 Using SignalR, is there any possibility to call .fail instead of .done when specific values are returned by hub method? Perhaps using the SignalR pipeline? public bool Delete(int addressId) { // User should not be able to delete default address if(AddressService.IsDefaultAddressOfCustomer(addressId)) return false; // Should call .fail() on client AddressService.Delete(addressId); return true; // Should call .done() on client } The alternative would be to throw an exception but I would like to

Intermittent problems with SignalR Hubs (in the Cloud) callback from Server to Client method

你离开我真会死。 提交于 2019-12-11 02:22:31
问题 So far, SignalR Hubs has been working perfectly with a locally hosted website in IIS 7.5 on my dev machine. I have the client making a signalr call to the server on a click event, then the server does a 20 second thread delay before sending a response back to the callback method on the client. This works consistently across all browsers. However, when I deploy my application to the Windows Azure Cloud, SignalR begins to have these intermittent problems. Specifically, there seems to be a

SignalR client disconnect causes high thread usage fro IIS

為{幸葍}努か 提交于 2019-12-11 01:42:49
问题 We have a server and clients that are implemented to communicate via signalr. We have implemented scaleout using SQL server and then later with Redis. When connecting more than around 70 clients to the server all the clients are suddenly gets disconnected. Following is the trace logs from the clients. 08:45:09.5481482 - 41219ddc-af97-4738-b75e-07fe6bbd5472 - WS: OnMessage({}) 08:45:19.5763845 - 41219ddc-af97-4738-b75e-07fe6bbd5472 - WS: OnMessage({}) 08:45:29.5868786 - 41219ddc-af97-4738-b75e

How to check success of HubConnection.StartAsync in SignalR for ASP.NET Core 2.0?

ぃ、小莉子 提交于 2019-12-11 00:19:04
问题 Using SignalR for ASP.NET Core 2.0, Client side (1.0.0-alpha2-final), C# VS2017. To connect the code is: await hubConnection.StartAsync(); since this is an await for a void how can we test if the client did manage to connect ? In my tests I have a breakpoint on the server side in public override async Task OnConnectedAsync() but that breakpoint is not always hit therefore I know that sometimes the client does not connect. Or perhaps it did connect but OnConnectedAsync() was not triggered? How

Ionic 2 signalr is not connecting with hub

三世轮回 提交于 2019-12-10 23:49:01
问题 i am using library 'signalr-no-jquery' in ionic2 with visual studio 2015 . I'm using the following code . Import: import { hubConnection } from 'signalr-no-jquery'; Code: console.log("Stage 1"); var connection =new hubConnection('http://192.168.0.213:9000'); console.log("Stage 2"); var hubProxy = connection.createHubProxy('broadcaster'); console.log("Stage 3"); connection.start({ jsonp: true }) .done(() => { console.log('Now connected, connection ID=' + connection.id); }) .fail(() => {