c# Elastic Beanstalk web应用程序,无法找到与webhttpbinding端点的https方案匹配
本文关键字:端点 webhttpbinding https 方案 web Beanstalk Elastic 应用程序 | 更新日期: 2023-09-27 18:15:00
基本上我想创建一个https安全Restful WCF服务。因此,我为我的服务使用webhttpbinding,因为它支持创建RESTful服务。最好是我想用一个实例EBS来做,但EBS在c#/.net平台中不支持SSL cert. config,所以我设置了一个负载平衡器,将我的证书上传到IAM并在ELB上打开了侦听器。但无论我做什么,我的网。配置似乎不起作用。你能帮我弄清楚我的web配置吗?"
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<customErrors mode="Off" />
</system.web>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="webHttpBinding_ICustomerService" crossDomainScriptAccessEnabled="true">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
</security>
</binding>
</webHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:44300/CustomerService/CustomerService.svc"
binding="basicHttpsBinding" bindingConfiguration="" contract="WcfService2.ICustomerService"
name="" kind="" endpointConfiguration="" />
</client>
<services>
<service name="WcfService2.Service1" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="webHttpBinding" bindingConfiguration="webHttpBinding_ICustomerService"
behaviorConfiguration="webHttpBehavior" contract="WcfService2.ICustomerService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" httpsGetUrl="mex"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webHttpBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="0" multipleSiteBindingsEnabled="true">
<baseAddressPrefixFilters>
<add prefix="https://example.com/" />
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
</system.serviceModel>
'
看起来您在端点上使用了basichttpbinding,同时提供了一个http://地址,这会导致不匹配的方案错误。