A WCF service behind a firewall generates a wrong wsdl URI

守給你的承諾、 提交于 2020-01-16 00:42:12

问题


I developed a WCF service and i have published it with IIS. All goes well inside the local network but when the service is accessed by an external client from the internet, redirected by a firewall, the service generates a local wsdl uri that cannot be solve by the client.

Something like this:

  • URI needed: http://external_url/service.svc?wsdl
  • URI created: http://internal_url/service.svc?wsdl

I would like to continue using the automatic generation of the wsdl file without indicating an external path. I also have prove manipulating the ServiceBehavior attribute into the service class but the problem persists.

How can I do it?


回答1:


You need to configure the serverBinding header for your website within IIS. Here is a step by step for configuring WCF WSDL to use external domain name



来源:https://stackoverflow.com/questions/574768/a-wcf-service-behind-a-firewall-generates-a-wrong-wsdl-uri

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!