signalr

SignalR: Error loading hubs

↘锁芯ラ 提交于 2019-12-04 02:02:00
Signalr doesn't load my hubs: SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'></script>. I am calling app.MapSignalR(); in startup configuration . I added to my cshtml: <script src="~/Scripts/jquery-1.9.1.js"></script> <script src="~/Scripts/jquery.signalR-2.0.0.js"></script> <script src="~/signalr/hubs" type="text/javascript"></script> <script> $(document).ready(function () { window.hubReady = $.connection.hub.start(); }); </script> Make sure your startup class has this attribute: [assembly: OwinStartup(typeof(MyStartupClass))] You can define

Signalr Hub in Separate Dll

↘锁芯ラ 提交于 2019-12-04 01:46:38
问题 I had a hub hosted in a console app with a WPF app connecting to it. It worked just fine. Then I moved the hub into a separate project and added a reference from the host to new project. Now I am getting a 500 error, with no other details. Is there anything different that needs to be done in order to host a hub from another assemble/namespace? Edit: I tried a few things after opening the question. Here is what I have tried so far: Setting the HubName attribute. - Did not work. Passing the

Silverlight, SignalR and IIS Applications off of the Default Web Site

喜夏-厌秋 提交于 2019-12-04 01:40:59
问题 I'm using SignalR in a Silverlight 5 application. When I host my app in an "application" off of the default website in IIS 7.5 (i.e. localhost/subsite) Fiddler shows I get a 404 for "/signalr/negotiate". It doesn't seem to take the IIS application path into account. It should be requesting "/subsite/signalr/negotiate". How do I get it to use the correct url prefix? Update: I had to use the following code because it seems to be difficult to get the real root URI in a silverlight app without

SignalR $.connection is undefined

孤人 提交于 2019-12-03 23:15:22
问题 I admit it, I don't know what I'm doing. I'm attempting to learn how to use SignalR and I'm following various samples online almost verbatim and I can't get pasted $.connection being undefined. I'm working in MVC 4.0 and trying to use either nuget-downloaded signalR js files or those from sample projects. These are my script references. @Scripts.Render("~/Scripts/jquery-1.7.2.min.js") @Scripts.Render("~/Scripts/knockout-2.0.0.js") @Scripts.Render("~/Scripts/jquery.signalR.js") @Scripts.Render

三、Signalr外部链接

时光怂恿深爱的人放手 提交于 2019-12-03 22:59:03
一、本地外部引用 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> .container { background-color: #99CCFF; border: thick solid #808080; padding: 20px; margin: 20px; } </style> </head> <body> <div class="container"> <input type="text" id="message" /> <input type="button" id="sendmessage" value="Send" /> <input type="hidden" id="displayname" /> <ul id="discussion"></ul> </div> <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.js"></script> <script src="http://localhost

Asp.net session never expires when using SignalR and transport mode long polling

前提是你 提交于 2019-12-03 22:31:55
We have a web application that uses SignalR for its notification mechanism.The problem is when we are browsing our web application using IE ,SignalR uses Long Polling as its transport type thus sends back requests to our web server therefore Session never expires no matter how long the browser is idle. We were thinking that maybe we could catch the requests in Global.asax and see if they were from SingalR and set the session timeout to the remaining time (Which I don't think it's a straightforward solution). Is there any other solution the we are missing ? The workaround I am currently using

Visual Studio 2012 warning MSB3026: Could not copy DLL files

时光总嘲笑我的痴心妄想 提交于 2019-12-03 22:13:20
I keep getting: warning MSB3026: Could not copy dlls errors. I have several projects in the solution. On build, I also get the error: Error 47 Could not copy "myapp\bin\Debug*.dll" to "bin*.dll". Exceeded retry count of 10. Failed. The application just stops responding in the middle of debugging, and I have to close Visual Studio every time. Which was annoying, but now it's getting frustrating as well. We are eight team members, and all of us are getting the same error. We can't rebuild the solution, and the application is running very slow. One of things we are using in the project is SignalR

HubConnection could not be loaded from SignalR Assembly in Raspberry Pi Mono Project

不问归期 提交于 2019-12-03 21:26:39
I am trying to build a project in Raspberry Pi which communicates with my Azure server via Signalr. I have used SignalR in .NET client side in a mono project while working on a Xamarin project and was successful. For the test purpose, I have written a small block of code. using System; using Microsoft.AspNet.SignalR.Client; namespace testSignalr1 { class Program { static void Main() { var hubConnection = new HubConnection("******"); var serverHub = hubConnection.CreateHubProxy("HubTest"); serverHub.On("broadcastMessage", message => System.Console.WriteLine(message)); hubConnection.Start().Wait

Send server message to connected clients with Signalr/PersistentConnection

大兔子大兔子 提交于 2019-12-03 21:20:10
I´m using SignalR/PersistentConnection, not the Hub. I want to send a message from the server to client. I have the client id to send it, but how can I send a message from server to the client? Like, when some event happens on server, we want send a notification to a particular user. Any ideas? The github page shows how to do this using PersistentConnections. public class MyConnection : PersistentConnection { protected override Task OnReceivedAsync(string clientId, string data) { // Broadcast data to all clients return Connection.Broadcast(data); } } Global.asax using System; using System.Web

How can I keep trying to subscribe to signalR from Angular service if connection fails?

冷暖自知 提交于 2019-12-03 21:00:25
How can I keep attempting to connect to signalR in a safe way that allows a few hundred milliseconds (at least) in between attempts until the connection is established and if so, could someone provide a better way pf dealing with the various stages of connectivity to the web-sockets? We are using signalR on a .NET backend and I am trying to use it to display real-time push notifications in an Angular 4 UI. It works great when it connects, but there is a problem where sometimes it takes 2-3 times to connect. I also get an error this.startSignalRListener is not a function if I put it inside the