什么控制 WSDL 的肥皂地址位置中使用的 url?

发布于 2024-12-22 23:15:46 字数 1098 浏览 1 评论 0原文

我正在通过来自iis 6的https公开wcf服务。据我所知,我已经验证了iis中的绑定设置正确(是的,肯定站点id为“1”,并且已完成iisreset)。

当我运行此命令时:

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"

当我打开服务的 url 时,我可以看到它正确生成了 wsdl 的 url:

this:

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

为 svcutil.exe 指定了此 url:

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

但是,当我检查wsdl 本身,它停止使用域,并将其替换为 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 问题?另外,为什么它将soap地址从https更改为http?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨小沫ゞ 2024-12-29 23:15:46

愚蠢的错误...我在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文