Membership.ValidateUser是慢 [英] Membership.ValidateUser is Slow

查看:366
本文介绍了Membership.ValidateUser是慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 System.Web.Sercurity.Membership 的方法来处理我们的Web服务的用户。我很高兴与它在测试过程中作为我们的数据库和Web服务在同一服务器上驻留。

在数据库和Web服务,而移动到另一个我们得到,当我们进行身份验证与 Membership.ValidateUser(用户名,密码)的用户一个巨大的延迟命令服务器。

配置文件的详细信息:

 键入=System.Web.Providers.DefaultMembershipProvider,
      System.Web.Providers,版本= 1.0.0.0,文化=中立,
      公钥= *********
的connectionStringName =BlaBlaConnection
enablePasswordRetrieval =假enablePasswordReset设置=真
RequiresQuestionAndAnswer =假requiresUniqueEmail =假
maxInvalidPasswordAttempts =5minRequiredPasswordLength =6
minRequiredNonalphanumericCharacters =0passwordAttemptWindow =10
的applicationName =/


解决方案

的问题是与数据库箱权限做
这篇文章帮助: https://elgg.leeds.ac.uk/webteam/weblog /15385.html

我们的数据库添加家伙的应用程序池标识和域的计算机标识到数据库箱和.NET根目录授予读/写访问。

当服务器被重新成像为这些目录的UNC路径并没有在C:驱动器,因此他们没有继承正常的ACL权限

在此得到纠正定时去一路下跌,
但是它仍然是我想要的(平均约4秒 Membership.ValidateUser(用户名,密码)的速度有点慢;
Roles.IsUserInRole(用户名,item.Role); 10000每小时负荷)

I am using the System.Web.Sercurity.Membership methods to deal with users of our web service. I was very happy with it during testing as our database and web service resided on the same server.

When the database and web service where moved to separate servers we are getting a massive delay when we are authenticating users with the Membership.ValidateUser(username, password) command.

Config file details:

type="System.Web.Providers.DefaultMembershipProvider, 
      System.Web.Providers, Version=1.0.0.0, Culture=neutral,    
      PublicKeyToken=*********" 
connectionStringName="BlaBlaConnection" 
enablePasswordRetrieval="false" enablePasswordReset="true" 
RequiresQuestionAndAnswer="false" requiresUniqueEmail="false"       
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"   
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" 
applicationName="/"

解决方案

The issue was to do with permissions on the database box This article helped: https://elgg.leeds.ac.uk/webteam/weblog/15385.html

Our Database guy added the App Pool Identity and the Domain machine identity to the database box and .NET root directories granting read/write access.

When the servers were re-imaged the UNC paths for those directories were not on the C: drive so they didn't inherit the "normal" ACL rights

When this was corrected the timings went way down, But it's still a bit slow for what I want (averaging about 4 seconds for Membership.ValidateUser(username, password); and Roles.IsUserInRole(username, item.Role); with a load of 10,000 per hour)

这篇关于Membership.ValidateUser是慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆