Question

I have been looking for an hour and am baffled why the SignalR sample code actually works! I got it installed from nuget and it just works, which is good but cannot see how.

I cannot see anything in the global.asax or web.config to register the HttpHandler. I suspect this is probably a static constructor in some class and adds the handler (although again with no code using the class, that will not work), but cannot figure out without looking at the code - and for this, I dont feel like going through all the code.

So what have I missed?

Thanks for your help.

Was it helpful?

Solution

OK, I figured out.

It uses PreApplicationStartMethod assembly attribute to load class Bootstrapper to register the HubModule.


UPDATE

In fact, in the version of samples I have, it is done in PreApplicationStart which is different from the source code that is in the GitHub (they have added support for OWIN, etc hence the loading has been abstracted out to separate hosting assemblies).

OTHER TIPS

Download the source code and look for the AspNetHost class.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top