1.问题
错误信息:此集合已经采用方案 http 的地址。此集合中每个方案中最多只能包含一个地址。如果服务承载于 IIS 中,则可以通过将“system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled”设置为 true,或指定“system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters”来解决此问题。
参数名: item
异常类型:System.ArgumentException
程序集:System.ServiceModel
方法:Void InsertItem(Int32, System.Uri)
跟踪栈信息:
在 System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item)
在 System.Collections.Generic.SynchronizedCollection`1.Add(T item)
在 System.ServiceModel.UriSchemeKeyedCollection…ctor(Uri[] addresses)
在 System.ServiceModel.ServiceHost…ctor(Type serviceType, Uri[] baseAddresses)
在 Host.Program.StartUp() 位置 d:\Colleague\BaiYongsheng\Server\Host\Program.cs:行号 85

2.解决方案
2.1查看该网站的IIS是否绑定多个域名,如果有多个,接触绑定其一个。
博客内容涉及在IIS中部署WCF服务时遇到的异常,问题在于服务绑定的多个域名超过了限制。解决方案是检查并调整IIS配置,允许多个站点绑定或者指定基地址过滤。


被折叠的 条评论
为什么被折叠?



