SignalR Working on One Computer But Not Others

若如初见. 提交于 2019-12-06 15:05:43

I got this to work. Apparently it was an issue with the existing certificate set to use port 443. I don't know why that was an issue, but the following steps caused things to start working for me.

Note: Rick Strahl's blog helped: Hosting SignalR under SSL/https

  1. Created certificate in IIS specifically for this purpose:

Note: I did not have to use MMC to copy the cert from the personal folder to the trusted root folder. It was already in the trusted root folder.

  1. Delete the existing cert dedicated to port 443:

netsh http delete sslcert 0.0.0.0:443

Note: I originally tried to add the cert and got an error because a cert was already specified for port 443. That's why this delete is here.

  1. Add my new cert for port 443:

netsh http add sslcert ipport=0.0.0.0:443 appid={12345678-db90-4b66-8b01-88f7af2e36bf} certhash=hashGoesHere

Note: Rick Strahl's blog said to always use that appid. I don't know what an appid means in the context of a cert. So, yeah, whatever...

  1. Run my app and have it connect successfully:

Note: I'll need to use a real cert and trust it so I stop getting that warning. But that's not the point of this answer. I just wanted to show how I got this working with SignalR.

So while this got things working, I don't know why the original cert dedicated to port 443 wasn't working. Perhaps it wasn't in the root store. I couldn't figure out how to find that cert based on its hash on the PC.

Edit

For completeness, I wanted to share how you can get the cert hash. You can manually type it from looking at the certs in IIS, or you can copy it by finding it in MMC. It's the Thumbprint property of the cert. You just have to remove the spaces.

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