signalr

Async MVC.NET action method blocks any other HTTP requests

梦想的初衷 提交于 2019-12-04 15:58:11
问题 (I apologize for changing the question) The following snippet is from a MVC.NET controller (.NET: v4.5; AspNet.MVC: v5.2.3) . After LongOperation is called, it: Spawn a process Waits for its completion Monitors a few LOG files Uses SignalR to notify browser of the progress from the LOG files (I have omitted the code for simplicity) All this works, only while LongOperation is running, no other HTTP requests are handled by the controllers. They get handled after the LongOperation completes and

What is SignalR's browser compatibility?

天大地大妈咪最大 提交于 2019-12-04 15:28:52
问题 The most I've found online is in the SignalR FAQ, where it is stated that SignalR does not work in IE6/7. However, for legal reasons I need to present to customers a list of supported browsers. Is there such a list of tested browsers for SignalR? Thanks! 回答1: Looks like Microsoft has published some compatibility data: SignalR on ASP.NET: Supported Platforms From the article: SignalR can be used in a variety of web browsers, but typically, only the latest two versions are supported.

SignalR: Generated proxy vs. dynamically created hub file

北城以北 提交于 2019-12-04 14:54:45
Is the output from the SignalR hub proxy generator essentially the same as the dynamically generated hub proxy file? If not, what are the differences? Some background on my question: I am struggling creating the hub proxy using the command line tool due to dependency issues during execution and I do think obtaining the dynamically generated file might be an easier way. Benjamin Soulier As stated on this ASP.NET page about using hubs with SignalR: The generated proxy and what it does for you You can program a JavaScript client to communicate with a SignalR service with or without a proxy that

Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'></script>

99封情书 提交于 2019-12-04 14:48:27
There are two pages: Login.aspx and Profile.aspx, which are built using HTML and AngularJS. The login.aspx page uses ng-view to get the template of Login-view or Signup View. The code used is: <head> <title></title> <base href="/Login.aspx" /> <link href="StyleSheet/Login_css.css" rel="stylesheet" /> <script src="JscriptVendors/angular.min.js"></script> </head> <body ng-app="JouralApp_login"> <div ng-view></div> <script src="Jscript_Angular/Model.js"></script> <script src="Jscript_Angular/Controllers/LoginPageController.js"></script> <script src="JscriptVendors/angular-route.min.js"></script>

SignalR: How to stop creating new connection on page reload

本小妞迷上赌 提交于 2019-12-04 14:45:32
Hi i am developing a chat application along with some other pages in my application. once i login i am maintaining the session of the user. My main intention is that user should get notification whenever another user connects to server. The problem that i am facing is whenever i navigate to some other page in my application the connection is lost. How to stop this behaviour and continue the connection until user logs out. I am using SignalR 2.0 in ASP.NET MVC4 project, any help?? Each connection only has a lifecycle for the duration of the time the user spends on a given page. When they

SignalR on Xamarin.iOS - randomly not able to call Hub method

拈花ヽ惹草 提交于 2019-12-04 14:26:34
I have a simple Hub running in Azure, that I have working perfectly from a console app in Windows. I just built a simple test Xamarin.iOS app, and it is giving some strange behavior. Randomly on LTE/Wifi or Simulator/Device - invoking a hub method fails with There was an error invoking Hub method X Randomly about 50% - everything works perfectly just like the console app on Windows - the two are even sending messages to one another I tested this on an iPhone 5S and iPhone 4S for devices. Any ideas on why this would happen? I'm using the Portable NuGet package on version 2.0.0. UPDATE: Here is

Signalr - Can't read query strings on server

亡梦爱人 提交于 2019-12-04 14:23:02
问题 I'm going crazy here. I did the chatHub tutorial and everything works fine. I connect to the server. I can broadcast a message to every client. Then I tried to add query strings because I would like to have some information on my user as many user can connect in the same session. This is my javascript (function ($) { // Declare a proxy to reference the hub. var chat = $.connection.chatHub; //chat.state.userName = "test"; //chat.qs = "userToken3=blablabla"; chat.qs = { 'uid' : '2541fdsf862d' }

Can someone provide a CorsPolicy implementation with an explicit Origins list?

天大地大妈咪最大 提交于 2019-12-04 13:54:38
Referring to the SignalR Hubs API Guide indicates the following information in the configuration comments: // Setup the CORS middleware to run before SignalR. // By default this will allow all origins. You can // configure the set of origins and/or http verbs by // providing a cors options with a different policy. map.UseCors(CorsOptions.AllowAll); however, the Origins property of System.Web.CorsPolicy has a private setter, no constructor that allows origins to be injected, and no exposed setter method. With regards to the Origins list, it seems to only expose an "AllowAllOrigins" property and

SignalR IOS Client, Web Socket transport cannot invoke the method from server

北战南征 提交于 2019-12-04 13:48:56
问题 I m using SignalR-ObjC Client to provide communication between my IOS application and .Net server. I can connect with longpulling and invoke methods from self-host cross domain server without any error. But because of my applications needs i have to use WebSocket. I have a Singleton Manager like : @implementation SignalRManager static int reconnectingTry; + (id)sharedManager { static SignalRManager *sharedHttpManager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{

How to modify the SignalR Hub URL

你。 提交于 2019-12-04 12:36:29
I would like to use a different base hub URL than ~/signalr/hubs . How to modify this url, for example to ~/api/hubs ? Second question, may I use a different url for a different sets of hubs? For example: ~/api/chat/hubs ~/api/email/hubs Thanks. Ran across this, possible now with 0.5+: RouteTable.Routes.MapHubs("~/api"); No you may not, it's hardcoded in the source. No the proxy generated is for all hubs. Well this question is old (4 years? wtf.. I always thought web sockets was kinda new ). ... Well they( Microsoft ) have new descriptive well written documentation on their website now This