We have a sporadic problem on our two internal website. The problem usually doesn’t affect both sites at the same time. We use active directory to login to our sites and occasionally we have to recycle our app pool to be able to log in. The error we get before recycling the app pool is:
我们的两个内部网站上有零星的问题。该问题通常不会同时影响两个站点。我们使用活动目录登录我们的网站,有时我们必须回收我们的应用程序池才能登录。我们在回收应用程序池之前得到的错误是:
login.LoginUser_Authenticate The directory service is unavailable.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindOne()
at System.Web.Security.ActiveDirectoryMembershipProvider.FindUserEntry(DirectoryEntry
containerEntry, String filter, SearchScope searchScope, Boolean
retrieveSAMAccountName, String& sAMAccountName)
at System.Web.Security.ActiveDirectoryMembershipProvider.ValidateUserCore(String
username, String password)
at System.Web.Security.ActiveDirectoryMembershipProvider.ValidateUser(String
username, String password)
at Test1.Login.LoginUser_Authenticate(Object sender, AuthenticateEventArgs e) in
C:\Websites\ContractManagement\Test1\Login.aspx.vb:line 18
We have tried recycling every night when the shop is closed and this doesn’t seem to effect this problem. We usually go between 2 and 3 weeks without seeing any issue.
当商店关闭时,我们每晚都尝试回收利用,这似乎不会影响这个问题。我们通常会在2到3周之间没有遇到任何问题。
I personally think the problem has to do with the fact that we have 2 AD servers and that we are ldap to connect to the domain. i.e. (LDAP://ourdomain.com/OU=GH,DC=ourdomain,DC=com
).
我个人认为问题与我们有2台AD服务器这一事实有关,而且我们很难连接到域。即(LDAP://ourdomain.com/OU=GH,DC=ourdomain,DC=com)。
I know that one of the times we had an issue was when one of the AD servers was rebooted and for whatever reason it didn’t resolve to the other server.
我知道有一次我们遇到问题的原因是当其中一个AD服务器重新启动时,无论出于何种原因它都没有解析到其他服务器。
Any suggestions?
1 个解决方案
#1
1
Did you ever find a solution? I was having the same issue until I found this post:
你有没有找到解决方案?在找到这篇文章之前,我遇到了同样的问题:
http://forums.asp.net/t/1589323.aspx?System+DirectoryServices+NOT+available
in web,config include this line
在web中,config包含此行
<assemblies>
<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
This resolved the issue for us
这解决了我们的问题
#1
1
Did you ever find a solution? I was having the same issue until I found this post:
你有没有找到解决方案?在找到这篇文章之前,我遇到了同样的问题:
http://forums.asp.net/t/1589323.aspx?System+DirectoryServices+NOT+available
in web,config include this line
在web中,config包含此行
<assemblies>
<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
This resolved the issue for us
这解决了我们的问题