如何确保WCF服务从可靠和真实的客户端执行请求 [英] How to ensure WCF service executing the request from reliable and autheticate client

查看:89
本文介绍了如何确保WCF服务从可靠和真实的客户端执行请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑WCF服务的场景

Consider the scenario where WCF service with

TransferMoney(SourceAccno,DestAccno)



以上服务转账款从源accnumber到目标accnumber。

服务正在检查请求是否来自客户端的指定IP地址。

但是如果另一个exe在客户端的同一台机器上运行,IP是相同的,并使用相同的orinigal客户端exe的app.config。

在该场景中,WCF服务如何确保有效客户端的请求处理。

客户端在外面服务器所在的服务器的防火墙。


Where above service transfer money from source accnumber to destination accnumber.
Whereas service is checking whether the request is coming from specified IP address of client.
But if another exe is running on same machine of client , which IP is same and using same app.config of orinigal client exe.
In that Scenario how can WCF service ensure the request processing for valid client .
client is outside the firewall of Server where the service is host.

推荐答案

1.要保护您的WCF服务,您应该使用 netTcpBinding 使用安全模式 TransportWithMessageCredential ,它同时包含 transport 消息 with clientCredentialType settings Certificate 。通过这种方式,您将使用基于SSL证书的非常快速且非常安全的通信渠道。



2.其他解决方案可以基于HTTP绑定SSL传输(与上面类似的传输设置)但是数学运算速度较慢。
1.To secure you WCF service you should use netTcpBinding by using security mode TransportWithMessageCredential, that have both the transport and the message with clientCredentialType settings Certificate. And in this way you will use a very fast and also a very secure communication channel based on SSL certificates.

2.Other solution could be based on HTTP binding based on SSL transport (the trasport settings similar with above) but this is math slower.


这篇关于如何确保WCF服务从可靠和真实的客户端执行请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆