此集合已经采用方案 http 的地址。此集合中每个方案中最多只能包含一个地址。

错误信息:此集合已经采用方案 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

 

 

这个问题百度下,可以找到很多解决方案

但是目前使用的代码中,同一个类型的基地址,只要有一个就可以了

posted @ 2015-08-04 10:56  ChuckLu  阅读(2696)  评论(1编辑  收藏  举报