signalr

.NET 4.5 WebSockets vs SignalR

会有一股神秘感。 提交于 2019-12-17 17:54:23
问题 I've seen signalR vs html5 websockets for asp.net MVC chat application but it doesn't 100% answer my question as it's based around HTML5 WebSockets, which Microsoft may have extended upon in .NET 4.5 with their WebSocket object. I'm wondering if the WebSocket feature does actually do the same as SignalR and fall back to long polling when WebSockets aren't available? Surely Microsoft would implement the same technology as SignalR in their approach to this technology? Edit: For anyone else

Node.Js + Socket.IO vs SignalR vs C# WebSocket Server

[亡魂溺海] 提交于 2019-12-17 17:24:11
问题 I currently have a TCP server application written in .Net that receives and submits messages to clients. I am looking at building a web application so need the communication layer. I have built a Node.JS + Socket.IO app which connects to my TCP server and then pushes communication to the web application and all works fine. I have just read about SignalR as an alternative to keep it in the .Net stack. However I have also found that I could write a C# Websocket Server, a basic demo here I

Node.Js + Socket.IO vs SignalR vs C# WebSocket Server

痞子三分冷 提交于 2019-12-17 17:22:09
问题 I currently have a TCP server application written in .Net that receives and submits messages to clients. I am looking at building a web application so need the communication layer. I have built a Node.JS + Socket.IO app which connects to my TCP server and then pushes communication to the web application and all works fine. I have just read about SignalR as an alternative to keep it in the .Net stack. However I have also found that I could write a C# Websocket Server, a basic demo here I

Can SignalR be used with asp.net WebForms?

倖福魔咒の 提交于 2019-12-17 16:06:58
问题 I want to use SignalR in my project for real time updates. My project is developed in WebForms . I searched for for 3,4 days but all I found were MVC examples. Can anyone suggest a solution? 回答1: You can use SignalR with webforms. See below for an example from the tutorial here Create a new ASP.NET WebForms project targeting .NET Framework 4.5 or later Change the home page to contain the following <asp:content runat="server" id="BodyContent" contentplaceholderid="MainContent"> <h3>Log Items<

How to use cross-domain connections (CORS - Access Control Allow Origin) with SignalR

放肆的年华 提交于 2019-12-17 15:39:21
问题 Using persistent connections and an ASP.NET JavaScript client, I am trying to connect to a sub-domain not the same as the one the page was served from. ASP.Net Page from webserver sub1.mydomain.com wants to connect to SignalR at sub2.mydomain.com . The same code works fine when connecting within the same sub-domain. I found another post where cross-domain connections were enabled with: jQuery.support.cors = true; but this did not work for me. How can I connect to SignalR in a second sub

SignalR and Browser Connection limit

僤鯓⒐⒋嵵緔 提交于 2019-12-17 10:29:12
问题 I made a simple app with SignalR for testing. When the page loads it calls a function on the server, that function then calls a client function that prints a message on the screen. I did that to check that both the client and server function works and SignalR communication works ok. My problem is that if I open the same page on two different tabs (did it in Chrome), the first page loads ok, but the second page doesn't call the server's functions - ONLY if I close the first page. So as far as

Self hosted OWIN and urlacl

人走茶凉 提交于 2019-12-17 07:26:11
问题 I've created a self hosted Nancy/SignalR application self-hosted in OWIN using Microsoft.Owin.Host.HttpListener and Microsoft.Owin.Hosting Things work perfectly fine locally but as soon as I try to use anything but localhost to access the app I get a HTTP Error 503. The service is unavailable error. I can't even access the app using 127.0.0.1 or the machine name. I've tried adding the port to urlacl using http add urlacl http://*:8989/ user=EVERYONE but doesn't seem to do anything. here are

How to implement real time data for a web page

六眼飞鱼酱① 提交于 2019-12-17 02:46:25
问题 (This is intended as a Q/A style question, intended to be a go-to resource for people that ask similar questions. A lot of people seem to stumble on the best way of doing this because they don't know all the options. Many of the answers will be ASP.NET specific, but AJAX and other techniques do have equivalents in other frameworks, such as socket.io and SignalR.) I have a table of data that I have implemented in ASP.NET. I want to display changes to this underlying data on the page in real

How to connect Hub if Hub is in different project SignalR?

a 夏天 提交于 2019-12-14 03:59:18
问题 I'm working with SignalR project, in which I want to use Hub in WebApi project as well as Web project. So I've created one class library project and implemented Hub over there. My project structure looks like: -ChatHub -Hub -Webapi -Website Here is my Hub: [HubName("chathub")] public class ChatHub : Hub { public override Task OnConnected() { return base.OnConnected(); } public override Task OnReconnected() { return base.OnReconnected(); } } When I calling Hub from my website it's working well

SignalR An asynchronous operation error

亡梦爱人 提交于 2019-12-14 03:57:56
问题 I'm using SignalR 1.1.2 and I have problem with async hub method. Everything works fine on my PC with ForeverFrame transport but after deploying on server and switching to web sockets transport I receive following error: An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@