ASP.NET Membership Authentication through Service

不打扰是莪最后的温柔 提交于 2019-12-06 00:32:32

You are going in the right direction.

ClientFormsAuthenticationMembershipProvider is a membership provider you are looking for.

Below is sample web.config configuration to use it:

<appSettings>
  <add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>

<system.web>
  <compilation debug="true" targetFramework="4.0" />

  <membership defaultProvider="ClientAuthenticationMembershipProvider">
    <providers>
      <clear/>
      <add name="ClientAuthenticationMembershipProvider"
    type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    serviceUri="http://localhost:49712/Authentication_JSON_AppService.axd" />
    </providers>
  </membership>
</system.web>

Configuration may be tricky. I spent hours before figure out that ClientSettingsProvider.ServiceUri should be added.

You may add temp WinForms or WPF project to your solution to build configuration. these types of projects have special tab - Services tab in project settings that provide GUI for configuration. Sample below is for .NET 3.5 but idea is the same for 4.0.

http://www.codeproject.com/Articles/27670/Implementing-Application-Security-with-Client-Appl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!