我已经创建并测试了WCF服务,一切正常。https环境下的WCF服务
当我部署到测试环境,并试图打开https://my.site/myapp/EnrollmentService.svc我已经得到了错误信息:
找不到的基址,对于端点 与结合 MetadataExchangeHttpBinding 比赛计划http。 注册基地址方案是 [https]。
互联网向我表明我需要添加一些更多的配置选项:
http://www.codeproject.com/KB/WCF/7stepsWCF.aspx
我已经添加了一些设置,以服务web.config文件。现在看来,以下列方式:
<system.serviceModel>
<services>
<service name="McActivationApp.EnrollmentService" behaviorConfiguration="McActivationApp.EnrollmentServicBehavior">
<endpoint
address="https://my.site/myapp/EnrollmentService.svc"
binding="basicHttpBinding"
bindingConfiguration="TransportSecurity"
contract="McActivationApp.IEnrollmentService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="McActivationApp.IEnrollmentService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="McActivationApp.EnrollmentServicBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
其实,我已经添加了“绑定”部分,指定它为我的终点。
但是这什么都没有改变......
请指教,我需要做的。非常感谢!
P.S.从https和http资源消耗WCF服务有什么区别?
非常好!非常感谢! – Budda 2011-01-10 22:12:10
......但是......在改变之后,网站开始在通常的“http”下工作,这是不允许的...... – Budda 2011-01-10 22:29:03