asp.net - SignalR IHubContext in WebRole Task -


i testing signalr application run in azure web role. have background processing thread, created in onstart of webrole.

when try use ihubcontext send group message, fails no errors - message never received in hub client. same code created inside global.asax function correctly.

imports system imports system.collections.generic imports system.linq imports microsoft.windowsazure imports microsoft.windowsazure.diagnostics imports microsoft.windowsazure.serviceruntime imports microsoft.aspnet.signalr imports system.threading.tasks  public class webrole     inherits roleentrypoint      public overrides function onstart() boolean          task.factory.startnew(sub() asynctasktest())          return mybase.onstart()     end function      private sub asynctasktest()                      threading.thread.sleep(10000)              dim context ihubcontext = globalhost.connectionmanager.gethubcontext(of testub)()             context.clients.group("testgroup").message("this delayed message webrole thread.")         loop      end sub  end class 

should possible use ihubcontext in way? count separate assembly, , require use of hubconnection? if can't use ihubcontext revert using inside global.asax , keeping web application alive.

thanks, daniel

i think, has webrole onstart method , web applications being 2 different processes.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -