此集合已經采用方案 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

 

 

這個問題百度下,可以找到很多解決方案

但是目前使用的代碼中,同一個類型的基地址,只要有一個就可以了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM