What controls the url used in the soap address location of the WSDL?

让人想犯罪 __ 提交于 2020-01-02 06:48:31

问题


I am exposing a wcf service over https from iis 6. I have verivied, as best I understand, that the binding is correctly set in iis (yes, positive that the site id is '1', and have done iisreset).

when I run this:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cscript.exe //NoLogo %sys
temdrive%\inetpub\adminscripts\adsutil.vbs enum W3SVC/1

this is in the list:

SecureBindings                  : (LIST) (1 Items)
  ":443:dev.mydomain.com"

When I open the url to the service, I can see that it is correctly generating a url to the wsdl:

this:

https://dev.mydomain.com/virtual.directory/servicename.svc

specifies this url for svcutil.exe:

https://dev.mydomain.com/virtual.directory/servicename.svc?wsdl

However, when I inspect the wsdl itself, it stops using the domain, and replaces it with the machine name in this section of the wsdl xml:

<wsdl:service name="servicename">
<wsdl:port name="BasicHttpBinding_servicename" binding="tns:BasicHttpBinding_servicename">
<soap:address location="http://machinename.inernaldomain/virtual.directory/servicename.svc"/>
</wsdl:port>
</wsdl:service>

Is my problem a web.config issue, or an IIS issue? Also, why does it change the soap address to http from https?


回答1:


Stupid mistake... I named my binding in the web config, but did not specify that binding to the service. All I had to do was clear the name of the binding . The simplified configuration for wcf services makes it so you dont have to specify a binding. In my case I just did not realize it was not seeing my binding (no error), and was using defaults. http://msdn.microsoft.com/en-us/library/ee530014.aspx



来源:https://stackoverflow.com/questions/8647015/what-controls-the-url-used-in-the-soap-address-location-of-the-wsdl

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