ConnectionString from app.config of a DLL is null

后端 未结 3 1254
闹比i
闹比i 2020-12-18 11:55

I have a class library that contains a valid connectionString inside the app.config. Inside that class library I want to use it with

ConfigurationManager.Con         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-18 12:46

    In this case you put the same entry (the in question) in your web app's web.config, ConfigurationManager.ConnectionStrings always looks at the current config, that's a web.config in your case.

提交回复
热议问题