如何在IIS上托管websocket-sharp服务器 [英] How to host websocket-sharp server on IIS

查看:416
本文介绍了如何在IIS上托管websocket-sharp服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个主机名,例如dev.websocketserver.com.

I have a hostname like dev.websocketserver.com.

现在,我想将Websocket-server托管在IIS中的此主机名上,以便我的套接字地址变为 ws://dev.websocketserver.com/Echo

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

我应该创建WCF服务,Windows服务吗?套接字将侦听尚未使用的端口.因此,如果我将WCF服务托管在主机dev.websocketserver.com下,并在Global.asax中创建服务器,则该服务器将不会与端口80绑定.

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.

谁能告诉我通过IIS托管websocket-server的基本体系结构是什么?

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

推荐答案

据我所知,你做不到.

websocket-sharp需要在其自己的端口中运行,因此您不能在同一端口中同时具有IIS和它.

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

您可以在同一主机上运行它们,例如可以使用ws://dev.websocketserver.com:8000.

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

IIS 8并进一步支持WebSocket,因此您可以在ASP.NET中使用内置的WebSocket,而不是使用websocket-sharp.

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

这篇关于如何在IIS上托管websocket-sharp服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆