FAQ Database Discussion Community


$.hubConnection is undefined

signalr
I am using SignalR version 2.2.0. With the below code, I get an exception stating that $ does not define hubConnection. I know I have the script paths correct, because I can set breakpoints in the signalr script and see that they are hit. I even step past where the...

Give a reference to another project/winform in SignalR Hub

c#,.net,winforms,signalr,signalr-hub
I am working on SignalR For Winforms official example. The way they handle UI interaction is using the Program instance/reference as you can see in the code below: public class MyHub : Hub { public void Send(string name, string message) { Clients.All.addMessage(name, message); } public override Task OnConnected() { //here...

MySQL Entity Framework Tables are not created

c#,mysql,entity-framework,signalr
Following this guide: http://www.asp.net/identity/overview/getting-started/aspnet-identity-using-mysql-storage-with-an-entityframework-mysql-provider I have attempted to setup a connection to my MySQL database with the Entity Framework. The connection goes through successfully, but whenever I run my code I get the following error: MySql.Data.MySqlClient.MySqlException: Table 'helpcontext.users' doesn't exist My Context class looks like this: [DbConfigurationType(typeof(MySqlEFConfiguration))] public class HelpContext...

How can we send notifcation to authenticate user on Signalr which uses BackPlane?

signalr,azureservicebus,signalr-backplane
We are using Azure Service Bus Topics as a backplane for signalR and we have at least 2 web instances. We want to send a notification to a specific user with SignalR. We are using "context.Clients.User" method on a web instance. If the user is connected to this web instance...

SignalR - OWIN - Multiple endpoints

signalr,owin,startup
I have a scenario as such. A base class which modules are derived from. Each module has it's own signalr hubs. I want to host all modules in a single host, separated by module name. Some modules will share hub names. namespace domain.com.base { public class BaseClass { public string...

SignalR working in browser not in app

cordova,signalr,ionic,hybrid-mobile-app
I have an app which uses signalR when I try it in the browser it works properly. of course the connection is to an absolute URLץ When I deploy the app to an android device it doesn't work. I connected Chrome to do remote debug to the app's webview and...

How to set BinaryType of SignalR

signalr
I make my signalrR connection in JavaScript like so: $.connection.hub.start().done(function () { //do something }); In using WebSockets I can set the BinaryType property like so: var wsUri = "ws://localhost:8080/whiteboard/websocket"; var websocket = new WebSocket(wsUri); websocket.binaryType = "blob"; or websocket.binaryType = "arraybuffer"; can i set this property for SignalR and...

How to save connection when u change page in signalR

javascript,asp.net-mvc,signalr,signalr-hub
I've a problem to save connection while I'm changing page. I've one page where show a list of rooms and second page with view of chat. When I'm join page with list of room it join method on connect, after when I'm choosed which room to join, it goes to...

Messages are not sent to groups signalr

javascript,asp.net-mvc,asp.net-mvc-4,knockout.js,signalr
having some troubles with messages in signalr, cant get working with groups, so it work when it have like this form: Clients.All.received(new { sender = sender, message = message, isPrivate = false }); In my project I've rooms, so when I'try to send messages to group they are not shown...

Wpf client and asp.net web app signalr Hub , save users logged in from wpf client in signalr server

c#,asp.net,wpf,signalr
I am creating SignalR hub in asp.net web app. My wpf application is a client for this SignalR hub I have login facility in my wpf application , I want to store this users on hub created in asp.net , so that I can send information to specific user. I...

SignalR Service Broker with data from SQL View, does it work? MVC 5 ASP.NET

sql,asp.net-mvc,signalr,service-broker
I've used SignalR with some Databases in SQL in my MVC 5 web application to update the Webpage when table data is modified. My question is... Can I use a MessagesRepository that uses a SqlCommand to a SQL View? Does a SQL View fire a Service Broker event? I'm very...

How to broadcast events from Web Api project to MVC app on a different App Pool using SignalR

.net,asp.net-mvc,iis,asp.net-web-api,signalr
My windows server running IIS has an MVC application in one app pool and a Web Api project in another. These projects were developed in different solutions. The web app currently communicates with the Web Api to use as a rest service. I need to add a SignalR hub to...

SignalR JavaScript client universal trigger

javascript,signalr
I need to attach an event to every hub.client method. For example: Hub.client.doSomething = function (e) { aFunction(e); }; Hub.client.doSomethingElse = function (e) { aFunction(e); }; Is there a way to attach aFunction() to all client methods on the client level, without placing the function in each client method?...

Can I run SignalR hub through Azure API Management?

c#,azure,signalr,azure-api-management
I have the same question as this guy this guy : can I run my SignalR hub through the Azure API management service? I cannot seem to configure it in the service: it only allows me to forward HTTP/HTTPS traffic. That matches the answer of the person in the forum...

Cannot read property 'client' of undefined using SignalR

asp.net-web-api,signalr,signalr-hub
I've been working all day on this with no luck. I have also tried (almost) every single SO question, but I didn't get it to work... I'm running web api with very simple SignalR push message and separately simple front end to show this push message. In my case the...

Signalr with android client

android,signalr,signalr.client
Hi I'm new to Signalr and I want to develop android native client application for communicate with signalr server. So I follow "whathecode" article and still i'm not able to connect to server. Anyone can give me some sample project or example.Its big help for me. Thank you. public void...

Deploying/Installing Self Hosted SignalR Windows Service to Windows Server 2012

c#,windows-services,signalr,windows-server-2012
I'm at the final stages of building a framework for a custom CMS which leverage's SignalR to do some magic. I have this running perfect in a console application but it's less than desirable in a production environment. So I've decided to port the code over to a Windows Service...

Alternative for sqldependency

c#,signalr,sqldependency
I have a mssql table that holds chat information. It has computed columns, has millions of rows and is being used/populated by an third party application. Now I want to use this table to show chat history on my website and possible in future have the ability to send messages...

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

javascript,angularjs,asp.net-web-api,signalr
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...

Decide which SignalR Hub to connect to

signalr,signalr-hub
I'm confused about the rule of deciding which Hub to connect or not using SignalR. In javascript, if I write $.connection.hub.start(), and say I have two Hubs(hub1 and hub2), then which hub gets connected? Or are they are both connected?...

Signalr not calling client function

jquery,asp.net,signalr,signalr-hub
I realize this question has been asked several times, but the solution others posted is not my solution. So, I'm hoping there's another answer to this problem that solves it for me. When debugging this on this on the server, it finds the appropriate client and calls the "addAlert" method....

Connect to WinForm server using SignalR?

java,android,signalr,signalr.client
I have downloaded the official example of SignalR and it works fine when I try to connect from WinFormsClient to WinFormsServer. Everything just fine... I downloaded the SignalR for android and tried to make a connection using the code below, but no success what so ever...I only get SocketTimeoutException. Here...

SignalR java cannot connect to server

java,signalr,signalr.client
I'm having trouble connecting my java application to my SignalR Server. The server is very simple and can be found here: https://code.msdn.microsoft.com/windowsdesktop/Using-SignalR-in-WinForms-f1ec847b I can connect web clients(javascript) and windows clients (C#) but I'm having trouble with my java client.(https://github.com/SignalR/java-client) Here is my code so far: package javaapplication2; import java.io.IOException; import...

Callback on client does not get triggered with SignalR

javascript,c#,asp.net,signalr
I'm currently getting up to speed with SignalR, and tried to build a very basic message notification system using the very basic understanding of SignalR that I have but I can't get the messages to come back after the submission. I've read up on numerous blogs on the topic and...

SignalR Hub listening for Entity Framework additions

c#,entity-framework,signalr,subscribe
I tried looking for an existing question like this, but wasn't able to find one. Basically, I want to implement an Activity Feed in my web application using SignalR, since I don't want to have to constantly poll a webservice if I don't have to. That seems pretty straightforward to...

OnDisconnected not called when published to IIS server works fine in Visual Studio

iis,model-view-controller,signalr,web-api,signalr-hub
Please forgive me if this has already been asked before. I looked around, but my situation didn't come into play on any answered question I came across. I'm Using SignalR 2.2.0 Setup: I have a WebAPI 2 web application (call it API For short) that holds my hub called ChatHub....

Using Typeahead with SignalR

javascript,c#,asp.net-mvc,signalr,typeahead.js
I am attempting to use Typeahead with my SignalR implementation. What is happening is my Hub is getting hit and returning the value, but my result after .done() is undifined. I cannot work out why? Javascript $(function () { var search = $.connection.searchHub; $.connection.hub.start().done(function () { $('#searchBar').typeahead(null, { minLength: 2,...

SIGNALR: $.connection.hub.start() results in “Error parsing negotiate response.”

ajax,json,asp.net-mvc-5,signalr,signalr-hub
I had basic SignalR functionality implemented and working in my MVC5/AngularJS application recently, but after shelfing and unshelfing the changes I am now getting an error when the connection is negotiated in $.connection.hub.start(). I've stripped down the code to the very basics, but still get this error. Poking around in...

Using signalR with a javascript timer in an MVC 5 web application Memory consumption / how to

javascript,asp.net-mvc,timer,signalr,stopwatch
I'm using maček's answer from this post How to create a stopwatch using JavaScript? to create javascript timers in an HTML table for each tr. When someone starts the timer I would like it to be available for everyone else looking at that same tr element that may be on...

Signal Reconnect & TimeOut

signalr
I have developed a Mobile App using Xamarin Studio(C#).I used SignalR to receive push notification from the server.But its wired if start to implement reconnect & time out. Reconnect: NOTE:I did testing by turn off/on to my network connection. It works well after the first disconnect(i.e;i am able to reconnect...

How to report progress to all clients using MVC and self host signalr

c#,signalr,signalr-hub,signalr.client
I am very new to SignalR. I am trying to create a simulated conveyor that many clients can view the position of the conveyor (the simulated conveyor is a jQuery ui progressbar). What I have (and posted below) works across many clients - but the more clients you open, the...

What is the meaning of this Code in the Constructor

c#,asp.net,class,constructor,signalr
I'm trying the ASP.Net Signalr example. In the example here is a code to improve the signalr performance server side in the Hub. Here is the Code.. public class Broadcaster { private readonly static Lazy<Broadcaster> _instance = new Lazy<Broadcaster>(() => new Broadcaster()); // We're going to broadcast to all clients...

SignalR in WebFarm

wpf,silverlight,signalr,webfarm
I am trying to deploy my signalR based web application in ‘load balanced web farm’ using AWS Elastic load balancer and Auto Scaling. My application architecture is such that all users send messages from web browsers to server, and server send these messages to Silverlight OOB (or WPF app.) on...

SignalR not invoking method on server

c#,angularjs,signalr
I'm using AngularJS to create a SignalR service that connects to the hub that I specify and exposes the .on and .invoke methods so my controllers can listen for events from the server and invoke methods on the server. Here's the relevant part of my service: return { on: function...

Signalr:'default' done for a hub.server.method call

javascript,signalr,signalr-hub
I have a hub server method called with signalr many times. I know i can do: hub.server.method().done(function(data){ //my_code } but is there any way I can set a 'default' done() function so I don't have to repeat it every time I call that method?...

SignalR client on Windows Server 2008R2 using Server Sent Events

websocket,signalr
Server: Windows Server 2012 with WebSocket support Client Machine 1: Windows 8.1 Client Machine 2: Windows Server 2008R2 I built a C# application using the SigalR client that I can delpoy on my two client machines. However, the issue that I am running in to is that Client Machine 1...

How to display scheduled event to the clients using SignalR background continuation process?

asp.net-mvc,signalr,signalr-hub,signalr.client
I have list of events in the database. Events have the following properties, Message, UserId, StartDate, EndDate, StartTime, EndTime. My requirement is to alert the user by displaying the event before 15 minutes on the website. I am implementing this functionality by using SignalR concepts. This SignalR should process the...

Azure Mobile Service requires authentication for SignalR HTML/Javascript Client

azure,signalr,azure-mobile-services
I have a fresh Azure Mobile Service running locally at localhost:52253. I installed the latest SignalR Nuget Package: Azure Mobile Services .NET Backend SignalR Extension 1.0.450 I also have a test HTML/Javascript client served from localhost:54697/ After working out the CORs issues, I still cannot connect to signalR hubs because...

Sending SignalR Broadcasts that is running within ASP.NET MVC Application from a Windows Service on the same server

c#,asp.net-mvc,signalr,signalr-hub
I have an ASP.NET website that uses SignalR hubs to send messages to the website users. I have the code that calls the hubs within my business layer and I use dependency injection to inject the instances of the hubs up from my ASP.NET application to my business layer. The...

'System.AggregateException' occurred in mscorlib.dll” when using SignalR

c#,.net,signalr,unhandled-exception
Consider the following code: using Microsoft.AspNet.SignalR.Client; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Stock { public string Symbol { get; set; } public decimal Price { get; set; } } class Program { static void Main(string[] args) { var hubConnection = new HubConnection("http://www.contoso.com/");...

Session based DOM object visibility manipulation in real time application

jquery,asp.net-mvc-4,signalr
I am developing a remote monitoring application and have an issue that I would like to see if I can get some ideas on how best to resolve. When the server determines there is new information in the database to display to the client, it calls the SignalR client method...

How to prevent IIS from killing SignalR connection?

asp.net,iis,signalr
My ASP.NET Website (Hosted in IIS) will connect to SignalR hub once it is started. (I put the connection code in Application_Start). But I found out that sometimes the website will disconnect automaticaly because of some configuration in IIS recovery? How do I keep this connection alive between my website...

SignalR 2.1.2 Cannot call server method from client, but can call client from server

signalr
I'm not sure what is wrong here and it has to be something stupid simple. However I've checked over everything, tried several different things, all with no success. The server to client communication works great. No problems. But when I call notifications.server.test(); I get nothing. Nada. I can call my...

Signalr not sending to specific users

c#,asp.net-mvc,signalr,signalr-hub
I have inside my hub a method that is used to send to specific clients that a ticket was updated. However I want it to send it to the server inside the controller and to specific users, you can see how I am doing it below: I am using the...

Cross origin SignalR connection stops after negotiate

asp.net-web-api,signalr,cors,signalr-hub
I have an MVC 5 app serving up views, and a Web API 2 app as the service layer (.NET 4.5). The Web API app uses SignalR 2.1.2 to return progress as it's processing POSTs to the service API. The two are deployed to different domains, so I've set up...

Task await fails

c#,asynchronous,async-await,signalr,task
I am starting a HubConnection. First I get a new Instance of HubConnection, afterwards I create a new IHubProxy with Name = "fileHub" so far so good. My problem is located at (or in) the awaitable Function ContinueWith, I try to start the Connection, and write to the console wheater...

SignalR : use camel case

serialization,json.net,signalr,deserialization
I would like to know if there is a way to configure SignalR so that the client functions in the hub return objects using camel case. Thanks....

SignalR connection disconnects upon OnBeforeUnload

signalr,onbeforeunload
I'm having C# self hosted server application using SignalR. My client is SPA (angualr,javascript HTML5). My application have some termination process which should run when leaving the page (running when OnBeforeUnload occurs and the user asks to leave...). The termination process contains some server calls. Till today I worked with...

SignalR different applications on same backplaneDB

signalr,signalr-backplane
We host different MVC5 web applications for the intranet(500 employees) on server farms. We want to lightly use signalR 2.2 with SQL Server service broker backplane, mainly for server broadcast. We want to use the same backplane DB for different applications, all applications having acces to the backplane DB server....

Error in opening .xcworkspace

ios,signalr,afnetworking,cocoapods,socketrocket
I integrated pods in my project specifically SignalR, AFNetworking and SocketRocket. It was successfully installed, but when I opened .xcworkspace, this error shows: Has anyone encountered this kind of error? Thanks in advance. Update: My .xcodeproj has appeared. But the frameworks appear red. How can I solve this? ...

Handling events in WinForm UI that have been raised in instance of a SignalR persistent connections endpoint class

.net,vb.net,event-handling,signalr
So, I have put together a simple class to create a SignalR server and starts the Owin.HttpListener and allow clients to connect which has worked fine so far: Create server object , server object starts listener, client connects to listener, blah, blah, it works. However, the issue I am having,...

SignalR refusing connections

c#,asp.net,signalr
I'm trying to configure my signalR demo to my project framework : 4.0 , SignalR version : 1.1.3 Here's my code $(function () { var connection = $.hubConnection('http://localhost:32555/'); var chat = connection.createHubProxy('myChatHub'); chat.on('send', function (message) { $('#chat').html($('#chat').html() + "\r\n" + message); }); connection.logging = true; connection.start().done(function () { alert("Connection Complete");...

SignalR on hosting - virtualdirectory/signalr/hubs shows Error 404

c#,asp.net,signalr,http-status-code-404,web-hosting
I have a SinglaR app (empty web application without any global.asax and RouteConfig) which works well. http://localhost:62673/signalr/hubs shows 'ASP.NET SignalR JavaScript Library v2.2.0' javascript and it is working (I use Winforms client, not the javascript one). But when I deploy it to the webhosting (virtual directory), on the address http://myhosting.xxx/virtualdirectory/signalr/hubs...

SignalR Android access localhost

java,android,android-emulator,signalr
For some reason I cannot make make android app connect to my server (on localhost) The problem is (probably) not in the code,the exact same code runs fine in a simple java application I get an InvalidHttpStatusCodeException Bad Request - Invalid Hostname HTTP Error 400. The request hostname is invalid....

Best practice to implement sending message to custom groups in SignalR

signalr
I am developing a real time multiplayer game using SignalR. The message delivery logic is not very simple which I could not handle it by using Groups. For example, one message will be delivered to users with some custom property equals to some dynamic value. It means the target audiance...

Aborting/Cancelling an AJAX request not working in IE

javascript,jquery,ajax,asp.net-mvc,signalr
I have an application where a user is allowed to upload and download documents. In the download area, the user can select multiple files (all pdf), and do a merge and download. Great. There is a modal window that pops up during the merge process, that shows the status of...

SignalR: amount of async server-methods calls limited to 5

c#,asp.net,asynchronous,signalr,async-await
I'm started playing with SignalR and faced with that behaviour - marking public method in hub with async limits number of simultaneous client calls to 5. Once any of running operations finished, next call from some queue (or buffer) reaches the method in hub (at least stops at breakpoint) public...

SignalR Stops Working After A While

javascript,asp.net,signalr,signalr-hub
For some reason, SignalR will just stop calling client methods after a short period of time (about 1 hour or less I estimate). I have a page that shows Alerts... a very simple implementation. Here's the Javascript: $(function () { // enable logging for debugging $.connection.hub.logging = true; // Declare...

SignalR client doesn't work inside AngularJs controller

javascript,asp.net,angularjs,signalr,signalr.client
I've created Angular application based on routes. Without using the routes, the Signalr works fine, but when I work with routes, the Signalr works just in one way - from client side to server. <html ng-app="SignalR"> <head> //Scripts <script src="~/signalr/hubs"></script> </head> <body> <a href="#/Today">Today</a> <a href="#/History">History</a> <div ng-view> </div> <script...

Can a SignalR method name be namespaced?

c#,signalr
I have several SignalR Hubs each with several methods. Mostly with a CRUD like signature i.e. string AddNode(Node node); void RemoveNode(string id); void UpdateNode(Node node); Node GetNode(string id); List<Node> GetNodes(); Now every now and then I have to add more methods to a Hub or to add overloads and things...

Getting no messages back from SignalR cross domains, but ping working

javascript,c#,angularjs,asp.net-web-api,signalr
I refer to a previous post of mine where I got some help connecting to SignalR cross domains Here and I used This example to build my POC. However, the example I used was for a single I am still trying to figure out how the magic of SignalR works...

SignalR Content dont update if send to Client.Caller

c#,signalr
Hello and thanks for reading this. This is my NotificationHub.cs public class NotificationHub : Hub { private static readonly ConcurrentDictionary<string, User> Users = new ConcurrentDictionary<string, User>(StringComparer.InvariantCultureIgnoreCase); private static List<User> UserList = new List<User>(); Int16 totalNewMessages = 0; string UserID; [HubMethodName("check")] public Task Check(string id) { string profileId = id; //Context.QueryString["id"];...

calling the Caller method in SignalR hub outside the hub context

asp.net,signalr,signalr-hub
I have a question in my mind about the Caller method of SignalR. In the hub method we can call a client side function like this. Clients.Caller.addContosoChatMessageToPage(name, message); but when i use to call it from outside the hub context it is not found or not implemented?? like this.. var...

SignalR Issue : Cannot connect to Hub class

javascript,c#,.net,asp.net-mvc-5,signalr
I am using SignalR in MVC 5 and trying to create the connection with my Hub class (MyHub.cs) through JavaScript but getting below error message : Uncaught TypeError: Cannot read property 'client' of undefined Here is my code from which I am trying to create connection to SignalR : var...

Update UI from a SignalR call

angularjs,signalr
I am trying to update my UI when I receive a call from the SignalR server. In my sample code I have two Div tags, which in turn are controlled by different Angular controllers. I have a SignalR service that I have injected into one controller. On receiving event from...

Can SignalR connection IDs be faked?

signalr,signalr.client
Just how is the connection ID determined in SignalR? Could a user purposefully use another person's connection ID to pretend to be them? Obviously there's the difficulty of determining another person's connection ID since there's so many possible IDs. However, my application would make users aware of other user's connection...

Windows Service Start Failure for self hosted SignalR

c#,windows-services,signalr,windows-server-2012
Really trying to figure out how to install a SignalR Self Host windows service. It's my first attempt with a windows service and it's driving me bonkers. After many failed attempts, I really could do with some help. I'm using cmd in a windows server 2012 environment. The error in...

Invoke a SignalR hub from controller in MVC

c#,asp.net-mvc-4,signalr
I made Console Hub Application using SignalR for a central hub in visual studio 4.5 framework. By this Hub we can send notification from web application to desktop application. we can call hub from jquery, but my task is to connect console hub from asp.net MVC Contoller class. so here...

HTTP and SignalR

c#,asp.net,sockets,websocket,signalr
I am recently learning about web sockets in .Net and have just found SignalR which seems like too good to be true in terms of the abstraction of what connection to use and it seems like there are a few signalr clients in different languages which is awesome. In my...

SignalR client C# Windows Application using JavaScript (Without using any c# code)

signalr,signalr.client
I want to make an client Windows Application using java script by make my Windows Application as webBrowser1 (same idea of PhoneGap). I write html page that contains SignalR javascript code with necessary src. This is the code in Windows Application: webBrowser1.Url = new Uri(@"D:\Signal.html"); This is the src in...

StructureMap and SignalR - IMessageBus, no default instance defined

c#,asp.net-mvc-4,signalr,structuremap
I used nuget to update my project to signalr 2.2 and structure map 2.6.4. Now when my program attempts to use SignalR, structure map is throwing this error: StructureMap.StructureMapException was unhandled by user code HResult=-2146232832 Message=StructureMap Exception Code: 202 No Default Instance defined for PluginFamily Microsoft.AspNet.SignalR.Messaging.IMessageBus, Microsoft.AspNet.SignalR.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35...

SignalR MVC4 Issue

javascript,asp.net-mvc-4,signalr,signalr-hub,sqldependency
I am following this tutorial to integrate SignalR to my project http://venkatbaggu.com/signalr-database-update-notifications-asp-net-mvc-usiing-sql-dependency/ So basically this is my View where I want to show my table. @{ ViewBag.Title = "PatientInfo"; } <h2>PatientInfo</h2> <h3>@ViewBag.pName</h3> <h5>@ViewBag.glucoseT</h5> @if (Session["LogedUserFirstname"] != null) { <text> <p>Welcome @Session["LogedUserFirstname"].ToString()</p> </text> @Html.ActionLink("Log Out", "Logout",...

angularjs/signalR bootstrap progressbar not updating with controller changes

javascript,angularjs,signalr,angular-ui-bootstrap
I have a UI Bootstrap progressbar that I'm trying to hook up to messages from a SignalR hub. The idea is that the server-side hub sends me progress percentages that are reflected in the progress bar. The problem I have is that I see the messages coming into the browser...

LifeUpdate on Database change Throws error

c#,signalr
I followed this guide, And i do manage to get it to post the value of my database but when it wont update the page when i change the content in the database. So when I debugged the NotificationHub.cs These 2 lines throw an error. IHubContext context = GlobalHost.ConnectionManager.GetHubContext<NotificationHub>(); return...

SignalR android client can not have more than two AddMessage subscriptions

c#,android,.net,signalr
I am trying to make a chat application using SignalR between Desktop (C# - WinForms) and Android. I have two methods in my Hub: public void Send(string name, string message) { Clients.All.addMessage(name, message); } public void SendAnswer(string from, string requestWas, string answer) { Clients.All.addMessage(from, requestWas, answer); } In my android...

Print to console in SignalR Hub

c#,signalr,signalr-hub
I try to use SignalR, everything works fine except I can't print to console (in visual studio). Here's the code on server: public class GateSignalr : Hub { public void send(string state) { Console.WriteLine("send executed: "); Console.WriteLine(state); Clients.All.receiveState(state); } } i call method send in the server from client, and...

signalR self-host with console/windows service examples VS2010

vb.net,visual-studio-2010,signalr,owin,self-hosting
So I have found various bits and pieces about SignalR v2, it appears to be VS2012/2013 (.net 4.5) only. Can anyone supply a server/client example on how to self host in winforms/console/windows service using VS2010 (.net 4). Managed to get SignalR v1 + VS2010 + ASP.NET Chat application to work...

Moq SignalR Client events

testing,mocking,signalr
I have a service that uses the SignalR .Net Client to communicate with the server, and I want to add some test to check how the client will react to connection problems (Slow-Internet, Intermittent Connection, No connection at all), the problem is that I don´t know how to mock this...

SignalR: WebSockets is unsupported in the current application configuration

asp.net,iis,signalr,iis-express
I'm using SignalR 2.1.2 in my project. Everything was OK, But today I saw that notifications don't work in my project. I tried to troubleshoot issue So I checked Windows Event Viewer and saw this error: Exception information: Exception type: InvalidOperationException Exception message: WebSockets is unsupported in the current application...

“Could not establish trust relationship for the SSL/TLS secure channel.” Exception on signalr2.2, https, .net client, custom certificate

asp.net,.net,ssl,https,signalr
I got some exception in testing signalr .net client with custom self-signed certificate. There was no exception on http. Is there any problem in setting up the self-signed certificate in my code? Note that, there is no problem in my certificate file because it runs my https mvc sites well....

Calling wpf signalr client methods from outside hub in asp.net

c#,asp.net,wpf,signalr
public async Task ApplyChangedSettings() { if (ConnectionTimeEntryHub.State == Microsoft.AspNet.SignalR.Client.ConnectionState.Connected) { var d = await HubProxy.Invoke<TimeEntryV2.Models.Models.UpdatingSettings>("GetSettings", User.UserIdentity); TimeEntrySettings = d; } } Above method is created in wpf client viewmodel , I want to call this method from class outside hub in my asp.net web application as per documetation var hubContext...

SignalR and SqlDependency refreshment issue - ASP.NET

asp.net,webforms,signalr,sqldependency
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...

asp.net 5 web application with websockets on Windows 7

websocket,signalr,asp.net-5
I have a relatively simple web application that I am currently porting to asp.net 5. The current version runs under IIS on some Windows 7 and Server 2008 machines. With the next version of my software I would like to connect a C++ client via SignalR to the web application....

Signalr create two connection to two different hubs

c#,.net,signalr
I have two hubs and I am trying to establish two connections to them from server: var hubConnection1 = new HubConnection("http://localhost:14382"); var proxy1 = hubRestaurantConnection.CreateHubProxy("Hub1"); hubConnection1.Start().Wait(); var hubConnection2 = new HubConnection("http://localhost:14382"); var proxy2 = hubConnection.CreateHubProxy("Hub2"); hubConnection2.Start().Wait(); hubConnection2.Start().Wait() call allways crashes with exception: StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1,...

Simple Injector LifetimeScope with DbContext

signalr,simple-injector
I am using simpleInjector 2.8.0.0 I would like to construct just one instance of a dbContext during a lifetime scope. (My dependency chain has 2 dependencies on IDatabaseContext/DbContext) I have a scope decorator which implements the lifetime scope (The scope decorator is being injected into a SignalRHub): using (ServiceHost.Container.BeginLifetimeScope()) {...

Call to MapSignalR causes Protocol error

javascript,c#,asp.net-mvc,signalr
this is a follow-up to my previous question here.. MVC - trouble linking to another Controller/Action as you can see, i eventually did get my view from another controller to display in a new tab so it was working. that is until i installed SignalR. the simple version using this...

How to set Connection.Closed Event to make it reconnect in SignalR?

c#,signalr,signalr.client
I want to set a Timer on the disconnected event to automatically attempt reconnection. var querystringData = new Dictionary<string, string>(); querystringData.Add("uid", Uid); var connection = new HubConnection(HubUri, querystringData); _hub = connection.CreateHubProxy(HubName); connection.Start(new LongPollingTransport()).Wait(); connection.Closed += ???; //how to set this event to try to reconnect? I only know how to...

SignalR high frequency scaling out with WindowsAzure EventHub

c#,azure,signalr,azure-eventhub,aspnet-websocket
I am looking high frequency scaling solution for SignalR. I am wondering if I can do it with EventHub. If I use EventHub as my backplane for SignalR messages, will it become a bottleneck for me? I've checked this page but there is nothing about EventHub as it is fairly...

Using signalR hub from MVC action

c#,asp.net-mvc,signalr
Following this tutorial, I am attempting to display the progress of various steps in a long operation. I was able to successfully simulate a long operation within the hub based on the example, reporting updates back to the client with each step. Taking this a step further, I now want...

change old signalR hub to new version

asp.net,signalr,signalr-hub
I have chat sample using the old signalr dll version[0.5.3] and I want to make it in the new AspNet.SignalR library version 2.2.0 the old sample have Clients[chatRoom.chatRoomId]. where the Clients was a dynamic property in hub class. but in the new hub the Clients is not dybamic. How can...

Installing Asp.Net SignalR error while installing

asp.net,.net,.net-4.0,signalr,nuget
I am trying to install SignalR in Visual Studio 2010 professional project. But I am getting this error: Could not install package 'Microsoft.Owin.Security 2.1.0'. You are trying to install this package into a project that targets ' .NETFramework,Version=v4.0', but the package does not contain any assembly references or content files...

SignalR 2.2.0: client cannot call hub, hub doesn't get called

c#,asp.net-mvc-5,signalr,signalr-hub,signalr.client
Everything was working and now it's not :) I keep looking through my source control, but I can't figure out what went wrong. I'm not getting errors and I'm having trouble finding out what's going wrong when debugging. The client command to call the hub gets called, but the hub...

SqlDependancy is firing more times

sql,asp.net,signalr,sqldependency
Hi i am trying to implement sqldependancy with signalr for new database changes. but the problem is if i edit only one row then also sqldependancy is firing more time. and some time it is not firing. I have web application without MVC. bellow is my code public void page_load(object...

Universal Windows Platform and SignalR (Could not load file or assembly 'System.Net, Version=2.0.5.0)

c#,signalr,win-universal-app,visual-studio-2015,uap
when using the new Universal Windows Platform and a SignalR client (from Nuget) a strange thing happens when you set the network credential. The following code works flawlessly: NetworkCredential Connection_Credentials = new NetworkCredential( "Name", "Password" ); Microsoft.AspNet.SignalR.Client.Connection Connection = new Microsoft.AspNet.SignalR.Client.Connection( "http://localhost/Bla" ); However when you assign the NetworkCredential in...

Why is SignalR dependent on jQuery

javascript,jquery,signalr
So I know upcomping releases of SignalR are being made not to rely on jQuery. https://github.com/SignalR/SignalR/issues/372 - the closed issue to move it away from jQuery. But why was it dependant on it in the first place? (Obviously from a technical standpoint) Seeing as there seems to be nothing special...

Using ASP.NET Web application as SignalR client

asp.net,azure,windows-services,signalr
My team is in the middle of deciding the architecture of our backend system: Webserver A is an ASP.NET MVC application with ASP.NET Web API component, hosted in Azure Website. Windows Service B is a self-hosted OWIN server that will periodically push notifications to clients who subscribes to the notification,...

MVC SignalR app acting as a hub for a WPF app

iis,model-view-controller,signalr
If I build a website that has a built-in SignalR hub (single IIS site), such as http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc, can I use other apps to connect to it, such as WPF or whatnot. My impression is that I would need a standalone SignalR hub that runs on its own, on a different...

Disconnect clients on server exit

c#,signalr
Here's the server code I am using: using System; using Microsoft.AspNet.SignalR; using Microsoft.AspNet.SignalR.Hubs; using Microsoft.Owin.Hosting; using Owin; using Microsoft.Owin.Cors; using System.Collections.Generic; namespace flar3server { class Program { static void Main(string[] args) { string url = "http://localhost:8080/"; using (WebApp.Start(url)) { Console.WriteLine("Server running on {0}", url); Console.ReadLine(); } } [HubName("flar3hub")] public class...

SignalR, ASP.NET 5 and CORS

signalr,cors,asp.net-5
I'm trying to use SignalR with my MVC6 application, but I encounter problem with CORS. First : If I host my index.html file on http://localhost:1234/index.html (same as my web app) it's working. But when I host it elsewhere (for example in file:///C:/Users/me/Documents/index.html), I have this error : No 'Access-Control-Allow-Origin' header...

SignalR Scaleout on Azure RedisCache - Connection issues

c#,azure,redis,signalr
Based on information here http://www.asp.net/signalr/overview/performance/scaleout-with-redis , I've stood up an Azure Redis Cache. I've been scaling out SignalR over Azure ServiceBus up until this point, but frankly it drops a lot of messages and I'd like to investigate the other options. I'm trying to just do a little bit of...