当查看MyService.svc?wsdl时,WCF不使用计算机名称而不使用域名 [英] WCF not using computer name instead of domain name when viewing MyService.svc?wsdl
本文介绍了当查看MyService.svc?wsdl时,WCF不使用计算机名称而不使用域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的WCF serice似乎使用的是computer-name而不是域名。当我查看 MyService.svc?wsdl
链接时,它显示我的计算机名称。
My WCF serice seems to be using the computer-name instead of the domain name. When I view the MyService.svc?wsdl
link it is showing my computer name.
域名在web.config?端点地址,基地址或身份?
Where do I add my domain name in the web.config? Endpoint address, baseaddress or identity?
注意:我使用的是SSL,因此必须 https://www.example.com/myservice .svc
Note: I am using SSL so it has to be https://www.example.com/myservice.svc
推荐答案
WCF 4.0在某些情况下解决了这个问题,请求标头:
WCF 4.0 has solved this issue in some instances with a new config option that use Request Headers:
<behaviors>
<serviceBehaviors>
<behavior name="AutoVaultUploadBehavior">
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add scheme="https" port="443" />
</defaultPorts>
</useRequestHeadersForMetadataAddress>
这篇关于当查看MyService.svc?wsdl时,WCF不使用计算机名称而不使用域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文