signalr

Can I use SignalR in my Winform c# app?

旧时模样 提交于 2019-12-13 13:27:29
问题 I have a web service being polled every few seconds in my winform c# app. It checks for messages and gets them from my server and/or it relays messages from my desktop app to my server. The web service is being invoke in an infinite loop which the User can stop and start at the click of a button. When the polling is on the memory goes up and stays up (which I guess I expected using infinite loop). If there was way for my server to notify my client that a message is available then I assume I

Check authorize in SignalR attribute

懵懂的女人 提交于 2019-12-13 12:26:31
问题 i have some services on ServiceStack and use SignalR in this project. And now, i would like to secure hub connection (access only for authenticated users), but i use ServiceStack framework authentication.. (not asp.net authentication) and ServiceStack's sessions (write AuthUserId ih this session and authentication flag). So, when user trying connect to the hub -- hub must to check authentication... (yes, i can request Cookies from Hub (method OnConnected, for example), but SignalR check

Getting 0x800a138f - JavaScript runtime error: Unable to get property 'client' of undefined or null reference

荒凉一梦 提交于 2019-12-13 09:48:23
问题 I'm making a chat application using SignalR API. I'm getting error as: 0x800a138f - JavaScript runtime error: Unable to get property 'client' of undefined or null reference Here is my code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link type="text/css" rel="stylesheet" href="/Css/ChatStyle.css" /> <link rel="stylesheet" href="/Css/JQueryUI/themes/base/jquery.ui.all.css"> <!--Script references. --> <!--Reference the jQuery library. --> <script src="

What is the best way of communicating from web->web api->console app and back again?

 ̄綄美尐妖づ 提交于 2019-12-13 07:52:54
问题 I'm starting up a little code project to learn from the process, but I am not sure what's the best way of communicating between the different parts. First, I have a pure html/js client where the users need to get live updates frequently. Secondly, I'm considering having a web api application running to provide data. Thirdly I have a console application running, that needs to communicate with the web api application. So I'm thinking about using WebSockets all the way from client->web api-

How to send message in cross domain using signalr

浪子不回头ぞ 提交于 2019-12-13 07:43:16
问题 In my current project I want to build messaging system but on subdomains. Suppose there is buyer.xyz.com and seller.xyz.com, the buyer and seller can send message to each other and there is no user roles, buyer and seller are from diffrent tables. when buyer send message the message gets inserted in message table and specified seller should get updated if he is currently online and vice versa. I am new in signalr. If possible please give code examples. 回答1: Basically, the best way to get

JQuery example for calling SignalR Async Task

时光怂恿深爱的人放手 提交于 2019-12-13 07:37:28
问题 Does anyone have a working example of a JQuery based client calling an async task based method on a SignalR Hub? See the code below from the SignalR Doco for an example of a server side async task. public Task<int> AsyncWork() { return Task.Factory.StartNew(() => { // Don't do this in the real world Thread.Sleep(500); return 10; }); } 回答1: Here is an example * at server side: * public void AsyncWork() { // start working in a new thread var task = Task.Factory.StartNew(() => dosomething());

SignalR and Tabs , windows , cloned frames?

妖精的绣舞 提交于 2019-12-13 07:06:19
问题 I created a simple app which accept a text message from a client and reply to that specific connection : "Hey I got your message" , and besides that , broadcast the message to all others. Piece of code : 1 protected override Task OnConnected(IRequest request, string connectionId) 2 { 3 return Connection.Send(connectionId, "Welcome!"); 4 } 5 6 protected override Task OnReceived(IRequest request, string connectionId, string data) 7 { 8 Connection.Send(connectionId, "Connection " + connectionId

SignalR client connection error (UWP & JavaScript Client)

扶醉桌前 提交于 2019-12-13 06:52:41
问题 I have both, a simple UWP app running on local machine in Visual Studio and a simple AngularJS SPA. I have also an OWIN based self hosted server running in a Service Fabric Cluster. The server use web api and signalR. When I'm hosting the Service Fabric Cluster on my local machine, the UWP app and the angular app can open a connection to a signalR hub on the server. When I'm hosting the Service Fabric Cluster on Azure, the clients are not able to connect to the signalR hub. I'm getting:

WCF SSE via SignalR

淺唱寂寞╮ 提交于 2019-12-13 05:48:46
问题 I have a few different WCF Services running. I would like to send one-way messages to clients who will be running IE 11. I would like to send the messages in the form of a class (ServiceName,Message,MessageDT), and then any clients listening to a particular Service would receive the message, and display it to user. I have viewed a few tutorials on SignalR and they all seem to be slightly different scenarios, like a chat application. Even the Stock Ticker example, has this random class that

Expandable Listview does not refresh childs items (updated with solution)

荒凉一梦 提交于 2019-12-13 05:22:17
问题 i have a signalr instances in my android app that allow me to refresh my expandable listview (just add or remove child items). When i run my app in 2 differents mobiles at the begining it's works fine (adding or removing items in both sides) like i really want but when i start to navigate in differents activities and i repeat the same process that i did at the begining my signalr works(has new/updated list) but my expandable listview does not refresh. Here is my code: My adapter: public class