문제

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.

도움이 되었습니까?

해결책

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).

다른 팁

Download the source code and look for the AspNetHost class.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top