Reputation: 360
When the browser says long polling but the debugger in the constructor of hub class does not hit. What is the problem?
Basically what I want is everytime the long polling happens, I also want a particular functionality like a database call to be executed.
Upvotes: 0
Views: 44
Reputation: 31610
poll requests are receive channel (i.e. are only used by the server to send data to the client if there is any) and as the result they don't cause instantiating hubs. However you can override the ProcessRequest method on the server side - it is being called for each HTTP request the server is receiving so you can do whatever you want there.
Upvotes: 1