简体   繁体   English

从客户端访问WCF服务SQL成员资格提供程序

[英]Accessing WCF service sql membership provider from client

I have created a WCF service that is used for authentication. 我已经创建了用于身份验证的WCF服务。 It uses an asp.net SQL membership provider for the accounts.I need a way for the client application to be able to register an account, change password ETC. 它为帐户使用asp.net SQL成员资格提供程序。我需要一种使客户端应用程序能够注册帐户,更改密码ETC的方法。 The way I had originally planned and have started doing was basically interfacing the code within the service by creating matching methods that I could call from the client. 我最初计划并开始做的方式基本上是通过创建可以从客户端调用的匹配方法来在服务中连接代码。

For instance to create the user I would create a method that has all the needed parameters and then within the code body I would access the membership provider so the client could just pass the details into it. 例如,要创建用户,我将创建一个具有所有所需参数的方法,然后在代码体内,我将访问成员资格提供程序,以便客户端可以将详细信息传递给它。 So it is all actually done from within the same project/service. 因此,这实际上是在同一项目/服务中完成的。

Now that I have started I have began to wonder if I can access the sql membership provider directly from the client so I don't have to waste my time and interface the code. 现在,我已经开始思考是否可以直接从客户端访问sql成员资格提供程序,这样我就不必浪费时间和接口代码了。

If so could anyone point me in the right direction on how exactly I create an instance of the sql membership provider in another project so I can access it? 如果是这样,谁能在正确的方向上指示我如何在另一个项目中创建sql成员资格提供程序的实例,以便我可以访问它?

Microsoft has a standard framework that is targeted at what you're trying to do, it's called Client Application Services. Microsoft具有针对您要执行的操作的标准框架,称为客户端应用程序服务。 There's a walkthrough on the MSDN site MSDN网站上有一个演练

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

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