Hi all,
I am trying to instantiate a membership provider (Active membership provider) specified in a web.config file of a web. site. But while instantiating the membership provider I got error at the line 5 in below mentioned code saying "The connection name 'MyADConnectionString' was not found in the applications configuration or the connection string is empty." But the web application which uses that web configuration file is working fine. But I am facing problem only while initating the membership provider.
I am using below sample code for donig this. I did not understand where the problem could be.
1 Configuration mgr = WebConfigurationManager.OpenWebConfiguration("/", webapp.Name);
2 MembershipSection sec = (MembershipSection) mgr.GetSection("system.web/membership");
Go to the complete details ...