By default, the class library cannot access the configuration file.
The class library client, in this case your web project, can provide configuration settings.
Therefore, put all the relevant settings, connection strings, in the web configuration file. The ConfigurationManager code in the class library will use the web project configuration settings.
source share