How to host websocket-sharp server on IIS

故事扮演 提交于 2019-12-11 10:24:34

问题


I have a hostname like dev.websocketserver.com.

Now I want to host my websocket-server on this hostname in IIS, so that my socket address becomes ws://dev.websocketserver.com/Echo

What should I create WCF service, windows service? Socket will listen on port that is not already in use. So if I host my WCF service under host dev.websocketserver.com and in Global.asax create a server then it will not get bound with Port 80.

Can anyone tell me what should be the basic architecture for hosting websocket-server over IIS?


回答1:


As far as I know, you can't.

websocket-sharp needs to run in its own port, so you cannot have both IIS and it in the same port.

You can run both in the same host and have ws://dev.websocketserver.com:8000 for example.

IIS 8 and further supports WebSockets, so you can use the built in WebSockets in ASP.NET rather than websocket-sharp.



来源:https://stackoverflow.com/questions/35561343/how-to-host-websocket-sharp-server-on-iis

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