WCF 元数据位于单独的端口而非 SSL 上
对复杂的 WCF 配置相当陌生,并且已经环顾四周,但无法清楚地回答这个问题。 我正在寻找是的,这是可能的,理想情况下是一个样本,或者否,这是不可能的。
问题: 您能否将元数据 (WSDL) 从安全传输 (SSL) 服务中分离出来并使其成为普通的旧式 HTTP?
我们有一个 WCF 服务,该服务使用传输安全性 (SSL)。 在此阶段,在开发过程中,我们使用自己的 SSL 证书,因此我们是 CA。
因此,WSDL 使用
<serviceMetadata httpsGetEnabled="true" />
“服务行为”来公开。
当您浏览到 WSDL https://devserver:8010/MyService/?wsdl 时,您会得到通常,不知道 CA 警告,只需单击“忽略”继续。
我遇到的问题之一是,即使我已将 CA 证书放入 cacerts 的 JDK/JRE 密钥库中,像 JAX-WS 这样的代理生成工具也会出现 HTTP.403 Forbidden 警告。
所以我在想,如果我可以分离出元数据,那么您可以将其公开在单独端口上的 HTTP 上,然后生成代理就不会出现证书问题。
因此,我尝试按如下方式标记服务元数据:
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://devserver:8011/MyService/" />
但这不起作用,因为它现在混合了行为。
也许我错过了什么? 也许这是不可能的?
是的,在某种程度上它是没有实际意义的,因为生产机器将有一个受信任的 CA,因此您不会收到证书信任警告。 然而,现在的问题是这可能吗?
感谢所有帮助,谢谢 哈德利
Pretty new to complex WCF configs and have looked around, but couldn't clearly answer this.
I'm looking for a yes this is possible and ideally a sample or no, this is not possible.
Question:
Can you separate out the Metadata (WSDL) from a secure transport (SSL) service and make it plain old HTTP?
We have a WCF service that is using Transport security (SSL) for the service.
At this stage, during development we're using our own Certificates for the SSL, so we're a CA.
So the WSDL is exposed using
<serviceMetadata httpsGetEnabled="true" />
Under the service behaviours.
When you browse to the WSDL https://devserver:8010/MyService/?wsdl you get the usual, don't know the CA warning and just click IGNORE to continue on.
One of the problems I've got is that a proxy generation tool like JAX-WS just bails with a HTTP.403 Forbidden warning, even though I've put the CA certificate into the JDK/JRE keystore for cacerts.
So I was thinking, if I could separate out the Metadata then you could expose that on HTTP on a separate port and then there's no certificate issues for generating proxies.
So I tried marking the service metadata as follows:
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://devserver:8011/MyService/" />
But this doesn't work as it's now mixing up the behaviour.
Perhaps I've missed something?
Perhaps this isn't possible?
And yes, to some extent it is moot, as a production machine WOULD have a trusted CA and therefore you won't get the certificate trust warnings.
However, it's now become a question of is this possible?
All help appreciated, thanks
Hadley
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还需要指定您的 MEX 端点
http://bloggingabout.net/blogs/dennis/archive/2006/11/09/WCF-Part-4-3A00-Make-your -service-visible-through-metadata.aspx
请注意,它将需要不同的绑定配置,其中 security = None 而不是传输。
You also need to specify your MEX endpoint
http://bloggingabout.net/blogs/dennis/archive/2006/11/09/WCF-Part-4-3A00-Make-your-service-visible-through-metadata.aspx
Note it will need a different binding configuration with security = None instead of transport.
做了一些更多的尝试和错误,最终的结果是这样的。为简洁起见,此内容被缩短。
Did some more trial and error and the end result which works is like this. This is shortened for brevity.