WCF Web 服务托管在 IIS 中,并使用 wsHttpBinding
和 TransportWithMessageCredential
安全模式。我通过继承 UsernamePasswordValidator
来处理身份验证。我有一个连接到 Web 服务的 WPF 客户端。在该客户端中,如果用户没有帐户,他应该能够登录或注册。在通过身份验证之前,代理无法调用服务上的任何方法。我想过创建一个注册网站,但我宁愿使用桌面应用程序。我的问题是我可以选择哪些选项来启用注册?有标准方法吗?非常感谢任何提示/技巧。
A WCF web service is hosted in IIS and uses wsHttpBinding
with TransportWithMessageCredential
security mode. I handle the authentication by inheriting from the UsernamePasswordValidator
. I have a WPF client which connects to the web service. In that client the user should be able to login or register if he doesn't have an account. The proxy can't call any methods on the service before it has passed authentication. I thought of creating a website for registration, but I would rather use the desktop application instead. My question is what are my options to enable registration? Is there a standard approach to this? Any tips/tricks much appreciated.
发布评论
评论(1)
您可以使用 ASP.Net 成员资格和角色提供程序创建用户(假设您已在 IIS 中托管该服务)。
您可以使用 ASP.Net 及其标准登录控件创建注册门户。或者,您可以创建自己的 UI 来调用 WCF 身份验证服务,该服务是默认 asp.net 成员资格提供程序的包装器。检查 这里
You can create users using using ASP.Net Membership and Role providers (assuming you have hosted the service in IIS).
You can either create a registration portal using ASP.Net and its standard Login controls. Or you can create your own UI that calls WCF Authentication services which is a wrapper around the default asp.net membership provider.Check here