简体   繁体   English

如何使用IP地址通过SSL协议访问WCF?

[英]How to access WCF with SSL Protocal using IP Address?

Hope my question is clear! 希望我的问题清楚!

I have created a WCF Service and have implemented all necessary work for SSL implementation. 我创建了WCF服务,并已实现SSL实施的所有必要工作。 From IIS to Web.config 从IIS到Web.config

I am able to accessing Service with following URL successfully on browser from my own PC. 我可以在自己的PC上的浏览器中成功访问带有以下URL的服务。

https://mycomputername/wcfService.svc

but How can I access it using my IP-Address eg: 但是如何使用我的IP地址访问它,例如:

https://192.x.x.x/wcfService.svc

Actually I have to access the web service from another PC with in my network. 实际上,我必须从网络中的另一台PC访问Web服务。

The SSL certificate will be associated with a domain name, not with an IP address. SSL证书将与域名关联,而不与IP地址关联。

So you will have to customize how to accept the SSL certificate. 因此,您将必须自定义如何接受SSL证书。 If you have a .NET client, you can use ServicePointManager.ServerCertificateValidationCallback and return true to accept any certificate. 如果您具有.NET客户端,则可以使用ServicePointManager.ServerCertificateValidationCallback并返回true来接受任何证书。

Related: How to ignore the certificate check when ssl 相关: ssl时如何忽略证书检查

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM