signalr.client

Ignore SSL errors with signalR Core Client

折月煮酒 提交于 2020-02-24 06:55:11
问题 I'm making an application that involves a website on localhost as a user interface with Asp.net Core and SignalR Core. My problem is that I get an authentication exception when starting the connection. I know this happens because I haven't ran dotnet dev-certs https --trust . But I can't expect an average user to run this command or have the dotnet SDK installed at all. I've tried using ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) =>

SignalR in Android Studio

二次信任 提交于 2020-02-03 01:54:10
问题 I'm trying to make use of SignalR in Android Studio and while it apparently has added the projects and dependencies to my application project I'm getting constant Error:(11, 39) error: package microsoft.aspnet.signalr.client does not exist The import for these packages was dynamically added by Android studio as I started typing code to make use of it Platform.loadPlatformComponent(new AndroidPlatformComponent()); So there is something there. However when I try and actually build my main

SignalR hubclass in classlibrary

血红的双手。 提交于 2020-01-16 01:55:08
问题 I have a signalr hubclass in a classlibrary and when i use that hubclass in my webapplication referencing that class library with below javascript code, it does not work, $(function () { var chat = $.connection.notificationHub; chat.client.newMessage = function (message) { alert(message); $('#messages').append('<li><strong>' + message + '</strong>: </li>'); }; $.connection.hub.start(); }); 回答1: You need an event to trigger your method in Hub class. See below example: NotificationHub in the

SignalR cross-domain connection - connecting connection Id's with users

此生再无相见时 提交于 2020-01-14 05:57:10
问题 I'm hosting my signalr hub on a separate domain and making cross domain connection to hub from my main application. When a user logs into the main application, signalr connection is established. Now, the problem I'm having is how to identify the connected user inside the hub. If my Hub was within the main application then I could use the Context.User of the logged in user and maintain a dictionary and update them on Connect and Disconnect events. But being a cross-domain connection, I don't

Signal r notification

我只是一个虾纸丫 提交于 2020-01-07 03:09:05
问题 I am creating an application using signal r to send notification. I am using VS 2012. In my Notification view I have added the code below in @model App.Models.Notification . @{ ViewBag.Title = "Index"; } @section Scripts { <script src="/Scripts/jquery-1.8.20.min.js"></script> <script src="~/Scripts/jquery.signalR-2.2.0.js"></script> <script src="/signalr/hubs"></script> <script type="text/javascript"> $(function () { var proxy = $.connection.notificationHub; alert(proxy); $("#button1").click

C# MVC - Send message with SignalR from server to Caller

大城市里の小女人 提交于 2020-01-06 15:52:13
问题 I have a request from client to Server using SignalR-2.2.1 . After that request, Server will send the results back to the caller. Here is my JavaScript code : $(document).ready(function () { var myHub = $.connection.signalHub; myHub.client.receive = function (tmp) { var obj = $.parseJSON(tmp); //do something }; $.connection.hub.start().done(function () { $('#xxxxx').click(function () { var form = $("form"); form.submit(); myHub.server.sendSomething(); }); }).fail(function (reason) { //do

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 client doesn't work inside AngularJs controller

倾然丶 夕夏残阳落幕 提交于 2020-01-01 10:52:45
问题 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 type="text/javascript"> var hubConnetion = undefined; hubConnetion = $.connection.hubs; $.connection.hub.start(); var

client constantly reconnecting

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-29 06:29:10
问题 My .net application which connects to signalr hub is constantly reconnecting. This problem only occurs on certain other corporate networks which makes me believe something is being blocked. I've tried to use the jabbr.net website from the same network and this doesn't work either (in chrome). How can i trace/fix this issue? 回答1: I think you're experiencing this issue https://github.com/SignalR/SignalR/pull/1553. We're working on a fix for it. The issue happens when the server sent events