我收到此错误: 此集合已包含一个地址与方案http。此集合中每个方案最多可以有一个地址。如果您的服务在IIS中托管,您可以通过将'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled'设置为true或指定'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'来解决此问题。完全删除<system.serviceModel>但仍然收到多个http端点错误
如果我设置< serviceHostingEnvironment multipleSiteBindingsEnabled = “真”/ >然后我得到这个这个错误:
当 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' 设置为true在配置,端点必须指定一个相对地址。如果您在端点上指定相对侦听URI,则地址可以是绝对的。为了解决这个问题,指定一个相对URI为端点
好吧,所以我的问题是这样的,如果我完全从配置文件中删除整个部分,我仍然收到第一个错误。意思是IIS认为当配置文件中没有任何东西时,我有多个端点。 我有一个Windows 2012服务器(iis 8)IIS的新安装,asp.net页面托管罚款。该应用程序在Windows 7和Windows 2003服务器(iis 6)上运行良好。
这是在配置文件中的我的服务模式部分:
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<service behaviorConfiguration="metadataSupport_Behaviour" name="myserver.Service.Gateway">
<host>
<baseAddresses>
<add baseAddress="http://www.myserver.com.au/Service/"/>
</baseAddresses>
</host>
<endpoint binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_Configuration_NoSecurity" contract="myserver.Service.IGateway"
address="Gateway.svc" listenUri="http://www.myserver.com.au/Service/Gateway.svc">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange">
</endpoint>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding_Configuration_NoSecurity" receiveTimeout="23:10:00" sendTimeout="23:10:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32000" maxStringContentLength="8192000" maxArrayLength="16384000" maxBytesPerRead="1024000" maxNameTableCharCount="16384000" />
<security mode="None">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport_Behaviour">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://www.myserver.com.au/Service/Gateway.svc" httpsGetEnabled="true"
httpsGetUrl="https://www.myserver.com.au/Service/Gateway.svc"/>
<serviceDebug includeExceptionDetailInFaults="true" httpHelpPageEnabled="false" httpsHelpPageEnabled="false"/>
</behavior>
<behavior name="basicHttp_ServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
请请帮助!