简体   繁体   English

使用 WCF 服务 By (windows form and android) client

[英]use WCF service By ( windows form and android ) client

At first I will describe my Current project and then ask Question.首先我将描述我当前的项目,然后提出问题。 1- Implementation Methodology : I developed project in WCF service on server side and have windows form and android client. 1-实现方法:我在服务器端的WCF服务中开发了项目,并有windows窗体和android客户端。 I'm using dot net 3.5 and WebServiceHost and WebHttpBinding on server.我在服务器上使用 dot net 3.5 和 WebServiceHost 和 WebHttpBinding。 android client developed on java and connect to server by , on the other hand I have windows form and used channelfactory for connect to server.在 java 上开发的 android 客户端并通过 连接到服务器,另一方面,我有 Windows 窗体并使用 channelfactory 连接到服务器。

2- authentication :authentication is a little complex on my project. 2-身份验证:身份验证在我的项目中有点复杂。 I have Item that name is workspace.我有名称为工作区的项目。 each workspace can has several role.每个工作区可以有多个角色。 user can related to several workspace.用户可以关联多个工作区。 Currently I'm sending username, password and workspaceid to server by each method from Clinet( winform and android).目前,我正在通过 Clinet(winform 和 android)的每种方法将用户名、密码和工作区 ID 发送到服务器。

Questions:问题:

1- I Know by WCF authorization I can send username and password to server from windows form with channelfactory by How can I Implement Role-based or Idendity-base from authorization options in WCF and use that on both java android client and C# winform, also It's necessery to send workspaceId for server. 1-我通过 WCF 授权知道我可以通过如何从 WCF 中的授权选项实现基于角色或基于身份的选项从带有 channelfactory 的 windows 表单发送用户名和密码到服务器,并在 java android 客户端和 C# winform 上使用它,也有必要为服务器发送workspaceId。

2- It's important secure data and I have to implant Transport Security or Message Security on server side. 2- 这是重要的安全数据,我必须在服务器端植入传输安全或消息安全。 How can I develop this feature and used that on java(android) and C#(winform) client.我如何开发此功能并在 java(android) 和 C#(winform) 客户端上使用它。

The solution should be implemented in the IOS Client in future解决方案以后应该在IOS Client中实现

It sounds like SOAP might be a better option for you here.在这里,听起来 SOAP 可能是您更好的选择。 I would suggest locking things down at the transport level with SSL, and then use WS-Security to securely send the username/password in the message header.我建议使用 SSL 在传输级别锁定事物,然后使用WS-Security在消息头中WS-Security地发送用户名/密码。 I would also send the workstation name in the message header as well.我也会在消息头中发送工作站名称。

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

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