I have read through all the related questions, but I still unable to get the right solution for some reason, something is not right on my side, but not sure what\'s causing
Here is the code to initialize a provider:
System.Collections.Specialized.NameValueCollection adProviderConfig;
adProviderConfig = membershipSection.Providers[adProviderName].Parameters;
var _ADProvider = new ActiveDirectoryMembershipProvider();
_ADProvider.Initialize(adProviderName, adProviderConfig);
I am trying to work out what you have done.... I think you have proceeded as follows:
Within this event, you have tried to do something like this and wondering why Initialize() isn't called while stepping through your code:
MyNameSpace.MyMemberShipProvider msp = new MyNameSpace.MyMemberShipProvider();
bool IsAuthorised = msp.ValidateUser(txtLogin, txtPass);
Solution: - Use this instead:
bool IsAuthorised = Membership.ValidateUser(txtLogin, txtPass);