同一网络内的远程计算机上的 WCF 回调
我有一个 WCF 客户端 &服务,其中服务(托管在控制台应用程序内)使用标准的 WSDualHttpBinding
和 WSDualHttpSecurityMode.None
回调客户端。当托管在本地计算机上时,一切都很好,但是一旦我将服务移动到本地计算机以外的计算机(但在同一网络上),客户端就无法再连接到该服务。
MEX 工作正常,我可以掌握 WSDL 等。使用 Fiddler 捕获出站流量后,得到的结果如下:
POST /chinchillin HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Host: 192.168.0.98:8080
Content-Length: 916
Expect: 100-continue
Connection: Keep-Alive
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</a:Action>
<a:MessageID>urn:uuid:aa317faa-f32e-4cbc-a6a3-5fdbc9f80fe6</a:MessageID>
<a:ReplyTo>
<a:Address>http://agogolev.ad.alponline.ru/Temporary_Listen_Addresses/f423a1ae-573a-4c14-9a64-c4ed26fc6366/3069625c-d37a-4de2-8f92-e078b51f01d5</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://192.168.0.98:8080/chinchillin</a:To>
</s:Header>
<s:Body>
<CreateSequence xmlns="http://schemas.xmlsoap.org/ws/2005/02/rm">
<AcksTo>
<a:Address>http://agogolev.ad.alponline.ru/Temporary_Listen_Addresses/f423a1ae-573a-4c14-9a64-c4ed26fc6366/3069625c-d37a-4de2-8f92-e078b51f01d5</a:Address>
</AcksTo>
<Offer>
<Identifier>urn:uuid:7d198ab8-4fed-4f62-a76b-6e2ae2a13dda</Identifier>
</Offer>
</CreateSequence>
</s:Body>
</s:Envelope>
HTTP/1.1 202 Accepted
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 08 Feb 2010 08:41:48 GMT
我尝试关闭两台计算机上的防火墙,使用 netsh -c http add urlacl url=http://+:8080/chinchillin user=domain\user 注册 URL ACL
。这些都没有帮助。
在这种情况下如何让回调起作用?
I have a WCF client & service, where service (which is hosted inside a console app) calls back to client using ever so standard WSDualHttpBinding
with WSDualHttpSecurityMode.None
. It's all fine and dandy when hosted on a local machine, but as soon as I move service to a computer other than my local machine (but on the same network), client cannot connect to the service anymore.
MEX is working fine, I can get hold of WSDL and all that. After capturing outbound traffic with Fiddler, here's what I got:
POST /chinchillin HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Host: 192.168.0.98:8080
Content-Length: 916
Expect: 100-continue
Connection: Keep-Alive
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</a:Action>
<a:MessageID>urn:uuid:aa317faa-f32e-4cbc-a6a3-5fdbc9f80fe6</a:MessageID>
<a:ReplyTo>
<a:Address>http://agogolev.ad.alponline.ru/Temporary_Listen_Addresses/f423a1ae-573a-4c14-9a64-c4ed26fc6366/3069625c-d37a-4de2-8f92-e078b51f01d5</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://192.168.0.98:8080/chinchillin</a:To>
</s:Header>
<s:Body>
<CreateSequence xmlns="http://schemas.xmlsoap.org/ws/2005/02/rm">
<AcksTo>
<a:Address>http://agogolev.ad.alponline.ru/Temporary_Listen_Addresses/f423a1ae-573a-4c14-9a64-c4ed26fc6366/3069625c-d37a-4de2-8f92-e078b51f01d5</a:Address>
</AcksTo>
<Offer>
<Identifier>urn:uuid:7d198ab8-4fed-4f62-a76b-6e2ae2a13dda</Identifier>
</Offer>
</CreateSequence>
</s:Body>
</s:Envelope>
HTTP/1.1 202 Accepted
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 08 Feb 2010 08:41:48 GMT
I tried turning off firewalls on both machines, registered URL ACL with netsh -c http add urlacl url=http://+:8080/chinchillin user=domain\user
. None of this helped.
How can I get callbacks to work in this scenario?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
明白了。我将应用程序的服务部分移至的服务器不在 AD 域内,无法解析
http://agogolev.ad.alponline.ru
。Got it figured. The server I moved the service part of my app to was not inside an AD domain and could not resolve
http://agogolev.ad.alponline.ru
.