什么控制了WSDL的soap地址位置中使用的url? [英] What controls the url used in the soap address location of the WSDL?
问题描述
我正在通过iis 6上的https公开wcf服务.据我所知,我已经确认在iis中正确设置了绑定(是的,肯定是站点ID为'1',并且已经进行了iisreset)
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).
运行此命令时
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cscript.exe //NoLogo %sys
temdrive%\inetpub\adminscripts\adsutil.vbs enum W3SVC/1
这是在列表中:
SecureBindings : (LIST) (1 Items)
":443:dev.mydomain.com"
当我打开服务的URL时,可以看到它正在正确地生成wsdl的URL:
When I open the url to the service, I can see that it is correctly generating a url to the wsdl:
此:
https://dev.mydomain.com/virtual.directory/servicename.svc
为svcutil.exe指定此URL:
specifies this url for svcutil.exe:
https://dev.mydomain.com/virtual.directory/servicename.svc?wsdl
但是,当我检查wsdl本身时,它将停止使用该域,并在wsdl xml的此部分中将其替换为计算机名:
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>
我的问题是web.config问题还是IIS问题?另外,为什么将肥皂地址从https更改为http?
Is my problem a web.config issue, or an IIS issue? Also, why does it change the soap address to http from https?
推荐答案
愚蠢的错误...我在Web配置中命名了绑定,但未指定与服务的绑定.我要做的就是清除绑定的名称. wcf服务的简化配置使它成为可能,因此您不必指定绑定.就我而言,我只是没有意识到它没有看到我的绑定(没有错误),并且使用默认值. http://msdn.microsoft.com/en-us/library/ee530014.aspx
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
这篇关于什么控制了WSDL的soap地址位置中使用的url?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!