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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -