我想知道是否可以通过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。
感谢。
答案 0 :(得分:1)
请注意,错误消息显示为
另一个应用程序已使用HTTP.SYS注册此URL。
所以这似乎表明另一个应用程序已经使用了端口443,这就是问题所在。如果主机标题不同,则只能有多个应用程序在同一端口上侦听。