This project is read-only.

If Your Users are in a SQL Membership Store, Use the SQL Membership Provider

- J.D. Meier, Carlos Farre, Jason Taylor, Prashant Bansode, Steve Gregersen, Madhu Sundararajan, Rob Boucher

If your user information is already stored in the aspnetdb database, or if you are building an Internet facing WCF application from scratch, use the SQL Membership provider to authenticate your WCF service clients. The Membership Provider authenticates all incoming client credentials against the credentials stored in the SQL Membership database. The membership feature is a good choice as it allows you to enable user name authentication without writing and maintaining custom code. The SQL Membership provider is configured in the Service config file. The following example demonstrates a Service SQL Membership Provider configuration.
    <add name="MyLocalSQLServer"
         connectionString="Initial Catalog=aspnetdb;data source=;Integrated Security=SSPI;"/>
      <membership defaultProvider="MySqlMembershipProvider" >
          <add name="MySqlMembershipProvider"
               type="System.Web.Security.SqlMembershipProvider" />

Set your binding to use UserName Authentication as follows
    <binding name="BindingConfiguration">
        <message clientCredentialType="UserName" />

Set the Service Credentials configuration to use the membership provider with username authentication
  <behavior name="BehaviorConfiguration">
      <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
        membershipProviderName="MySqlMembershipProvider" />

Last edited Jun 12, 2008 at 9:43 PM by prashantbansode, version 1


No comments yet.