Author: BFarley65 | Posted on: 9/19/2010 12:24:58 AM | Views : 772

I created a custom membership provider in my ASP.NET 4.0 web site, stored  in App_Code, and referenced in my web.config.
However, it doesn't appear to be pulling values out of web.config during initialization.
The code was taken from http://www.asp.net/general/videos/how-do-i-create-a-custom-membership-provider, and the only modifications were changing "connectionStringName" here to the name of my connection string:


Dim ConnectionStringSettings As ConnectionStringSettings = _ ConfigurationManager.ConnectionStrings(config("connectionStringName"))The connection string always comes back as nothing in this line:


If ConnectionStringSettings Is Nothing OrElse ConnectionStringSettings.ConnectionString.Trim() = String.Empty Then Throw ...

Go to the complete details ...