I am usign Membership.ValidateUser(model.UserName, model.Password)) in a app web .net Framework 4.7.1 c# to validate domain users. I only check that the user and password is correct, nothing else.
I have the next config in my web.config:
<authentication mode="Forms">
<forms name=".ADAuthCookie" loginUrl="~/Account/Login" timeout="450" slidingExpiration="true" protection="All"/>
</authentication>
<sessionState timeout="300"/>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
<membership defaultProvider="ADMembershipProvider" userIsOnlineTimeWindow="1">
<providers>
<clear/>
<add name="ADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnectionString" attributeMapUsername="sAMAccountName"/>
</providers>
</membership>
All works fine, but each 2 or 3 months the Membership.ValidateUser suddenly doesn’t work, I think that we are not freeign the users and is necessary restart the application pool to liberate it after a lot of connections and get the maximun of it (I don’t know).
I need help, thanks a lot.