【发布时间】:2011-01-19 08:02:39
【问题描述】:
我想知道是否可以通过 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。
谢谢。
【问题讨论】:
-
你应该在serverfault.com问这个问题
-
还要注意错误消息显示
Another application has already registered this URL with HTTP.SYS.。所以这似乎表明另一个应用程序已经使用了端口 443,这就是问题所在。 -
Daniel Gehriger 是对的,我猜你也运行了 IIS,它绑定到端口 443。
-
你是对的,确实杀死 IIS 解决了这个问题。但是,为什么 IIS 正在侦听的其他端口(例如 80)没有相同的问题?
-
因为其他端口的 IIS 主机标头可能不同。 - 将我的评论转换为答案。