Blazor Client Side Signalr not working when Hosting to IIS

我与影子孤独终老i 提交于 2020-05-31 05:43:13

问题


Is there any one who can point me in the right direction?

When hosting my Blazor Client Side application to IIS the signalr is not working. In visual studio with IIS express it work as expected. I did setup IIS and deployed the application as indicated in the Microsoft documents.

There is no console errors and the hub returns status code 200 when hosting in IIS.

Thank you in advance


回答1:


Websocket support is not enabled by default on IIS. It was introduced in IIS 8, and has to be enabled from windows' optional features: https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

Optional features -> IIS -> WWW services -> App Dev Features -> Websocket protocol

Disclaimer: I found this after asking a question about this myself, so I copied my answer from there: https://stackoverflow.com/a/61411666/4364057



来源:https://stackoverflow.com/questions/60283573/blazor-client-side-signalr-not-working-when-hosting-to-iis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!