Access web.config from separate Class Library?

前端 未结 6 1370
轻奢々
轻奢々 2020-12-16 15:01

I\'m looking for a good way to achieve the following:

I have a web application (MVC 3), with a separate Class Library that contains the back-end logic of a CMS that

6条回答
  •  悲哀的现实
    2020-12-16 16:01

    You can access System.Configuration.ConfigurationManager from your class library. That'll give you access to the AppSettings and ConnectionStrings.

提交回复
热议问题