Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions xml/System.Web.Security/MembershipProvider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
ASP.NET membership is designed to enable you to easily use a number of different membership providers for your ASP.NET applications. You can use the supplied membership providers that are included with the .NET Framework, or you can implement your own provider.
## Remarks

> [!NOTE]
> ASP.NET membership providers have been superseded by [ASP.NET Identity](/aspnet/identity/overview/getting-started/introduction-to-aspnet-identity). We strongly recommend updating apps to use the ASP.NET Identity platform instead of the membership providers.

ASP.NET membership is designed to enable you to easily use a number of different membership providers for your ASP.NET applications. You can use the supplied membership providers that are included with .NET Framework, or you can implement your own provider.

> [!NOTE]
> If you are not familiar with the membership features of ASP.NET, see [Introduction to Membership](https://docs.microsoft.com/previous-versions/aspnet/yh26yfzy(v=vs.100)) before continuing. For a list of other topics related to membership, see [Managing Users by Using Membership](https://docs.microsoft.com/previous-versions/aspnet/tw292whz(v=vs.100)).
Expand Down
12 changes: 7 additions & 5 deletions xml/System.Web.Security/SqlMembershipProvider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This class is used by the <xref:System.Web.Security.Membership> and <xref:System.Web.Security.MembershipUser> classes to provide membership services for an ASP.NET application using a SQL Server database. You cannot use a <xref:System.Web.Security.SqlMembershipProvider> without SQL Server. When your computer has SQL Server Express installed with the default instance name and user-instancing enabled, the <xref:System.Web.Security.SqlMembershipProvider> object will create a database called `aspnetdb` in the application's `App_Data` directory the first time the application is run.
## Remarks

> [!NOTE]
> ASP.NET membership providers have been superseded by [ASP.NET Identity](/aspnet/identity/overview/getting-started/introduction-to-aspnet-identity). We strongly recommend updating apps to use the ASP.NET Identity platform instead of the membership providers.

This class is used by the <xref:System.Web.Security.Membership> and <xref:System.Web.Security.MembershipUser> classes to provide membership services for an ASP.NET application using a SQL Server database. You cannot use a <xref:System.Web.Security.SqlMembershipProvider> without SQL Server. When your computer has SQL Server Express installed with the default instance name and user-instancing enabled, the <xref:System.Web.Security.SqlMembershipProvider> object will create a database called `aspnetdb` in the application's `App_Data` directory the first time the application is run.

To manually create the database, run the `Aspnet_regsql.exe` executable found in the `%systemroot%\Microsoft.NET\Framework\ versionNumber` folder and specify the `-A m` option (for example `aspnet_regsql.exe -A m`). The database created is called Aspnetdb. Alternatively, run `Aspnet_regsql.exe` to pull up the GUI configuration mode and choose to configure all ASP.NET Features.

If the membership provider is configured with a connection string that uses integrated security, the process account of the ASP.NET application must have rights to connect to the SQL Server database.

The Machine.config file defines a default <xref:System.Web.Security.SqlMembershipProvider> instance named `AspNetSqlMembershipProvider` that connects to the default SQL Server Express instance on the local machine. You can use this instance of the provider if you installed SQL Server Express with the default instance name, or you can define your own instance in the Web.config file for your ASP.NET application.

If you set the `passwordCompatMode` attribute to <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode.Framework40>, the application can use the hashing and encryption membership options that were added in ASP.NET 4. However, if the `passwordCompatMode` attribute is set to <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode.Framework20>, only the hashing and encryption membership options from the ASP.NET 2.0, ASP.NET 3.5, and ASP.NET 3.5 SP1 can be used. The default value is <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode.Framework20>. For more information, see <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode>.


If you set the `passwordCompatMode` attribute to <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode.Framework40>, the application can use the hashing and encryption membership options that were added in ASP.NET 4. However, if the `passwordCompatMode` attribute is set to <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode.Framework20>, only the hashing and encryption membership options from the ASP.NET 2.0, ASP.NET 3.5, and ASP.NET 3.5 SP1 can be used. The default value is <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode.Framework20>. For more information, see <xref:System.Web.Configuration.MembershipPasswordCompatibilityMode>.

## Examples
The following code example shows the Web.config file for an ASP.NET application configured to use a <xref:System.Web.Security.SqlMembershipProvider>.
Expand Down