Reading a key from the Web.Config using ConfigurationManager

后端 未结 10 1860
情书的邮戳
情书的邮戳 2020-11-28 17:55

I am trying to read the keys from the Web.config file in a different layer than the web layer (Same solution)

Here is what I am trying:

         


        
10条回答
  •  我在风中等你
    2020-11-28 18:17

    There will be two Web.config files. I think you may have confused with those two files.

    Check this image:

    click this link and check this image

    In this image you can see two Web.config files. You should add your constants to the one which is in the project folder not in the views folder

    Hope this may help you

提交回复
热议问题