AppSettings in App or Web Config Using a Linked File

前端 未结 3 1434
独厮守ぢ
独厮守ぢ 2021-01-11 11:48

I\'m trying to reference some common config settings between a Windows Service and an ASP.NET MVC website. I am doing this by using the file attribute on appSettings in eit

3条回答
  •  天命终不由人
    2021-01-11 12:06

    In the Web.Config you must add "bin/" (se example below).

    By default the web.config is NOT copied into the bin folder but the file common.config is, therefore you must add the path from web.config. In a non-web project the default behavior is that the App.config is copied to the bin folder with name MyProgram.exe.config and is in the same directory as common.config.

    
    

提交回复
热议问题