System.Web.Providers.DefaultMembershipProvider having performance issues/deadlocks

前端 未结 2 1167
轮回少年
轮回少年 2021-01-19 02:10

We have started to use the updated System.Web.Providers provided in the Microsoft.AspNet.Providers.Core package from NuGet. We started to migrate our existing users and foun

相关标签:
2条回答
  • 2021-01-19 02:32

    I was using the System.Web.Providers.DefaultMembershipProvider membership provider too but found that it was really slow. I changed to the System.Web.Security.SqlMembershipProvider and found it to be much faster (>5 times faster).

    This tutorial shows you how to set up the SQL database that you need to use the SqlMembershipProvider http://weblogs.asp.net/sukumarraju/archive/2009/10/02/installing-asp-net-membership-services-database-in-sql-server-expreess.aspx

    This database that is auto generated uses stored procedures which may or may not be an issue for your DB guys.

    0 讨论(0)
  • 2021-01-19 02:54

    You can create an index on lower(username) per Sql Server : Lower function on Indexed Column

    ALTER TABLE dbo.users ADD LowerFieldName AS LOWER(username) PERSISTED
    CREATE NONCLUSTERED INDEX IX_users_LowerFieldName_  ON dbo.users(LowerFieldName)
    
    0 讨论(0)
提交回复
热议问题