是否可以通过端口 443 使用 HTTP(而非 HTTPS)?

发布于 2024-10-12 14:15:56 字数 1841 浏览 2 评论 0原文

我想知道是否可以通过 TCP 端口 443 进行纯 HTTP(无 SSL)通信?

尝试更改基于 WCF 的服务器的地址以使用端口 443(但没有 SSL)失败,并显示以下消息:

Shunra.Common.Wcf.ShunraServiceHost - Open failed with exception
System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:443/NC/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'http://+:443/NC/' because it conflicts with an existing registration on the machine.
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open()
   at Shunra.Common.Wcf.ShunraServiceHost.Open() in c:\dev\windows\Common\Shunra.Common\Wcf\ShunraServiceHost.cs:line 65

这不是 HTTP 命名空间保留的问题,因为用户是管理员。

所以,我想知道是否对端口 443 进行了特殊处理,只允许通过它使用 HTTPS。

谢谢。

I wonder if it is possible to communicate plain HTTP (no SSL) over the TCP port 443?

Trying to change the address of my WCF based server to use the port 443 (but no SSL) fails with this message:

Shunra.Common.Wcf.ShunraServiceHost - Open failed with exception
System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:443/NC/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'http://+:443/NC/' because it conflicts with an existing registration on the machine.
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open()
   at Shunra.Common.Wcf.ShunraServiceHost.Open() in c:\dev\windows\Common\Shunra.Common\Wcf\ShunraServiceHost.cs:line 65

And this is not the matter of HTTP namespace reservation, since the user is an administrator.

So, I am wondering whether there is a special treatment of the port 443 as to only allow HTTPS over it.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

属性 2024-10-19 14:15:57

请注意,错误消息显示

另一个应用程序已向 HTTP.SYS 注册了此 URL。

所以这似乎表明另一个应用程序已经使用端口 443,这就是问题所在。如果多个应用程序的主机头不同,则只能让它们侦听同一端口。

Notice that the error message says

Another application has already registered this URL with HTTP.SYS.

So this seems to indicate that another application already uses port 443, and that this is the problem. You can only have several applications listen on the same port if they differ in their host header.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文