如何获取app配置文件内容

App.config:

         <appSettings>

         <add key="FCPConnection" value="Data Source=192.168.1.88;Initial Catalog=EMRCP;User Id=sa;Password=123456;" />

         <add key="FCPConnectionType" value="SQLSERVER" />

         <add key="OutPutErrorMessage" value="False" />

         <add key="CertName" value="WCFSecurityServerPK"/>

        <add key="ServicePath" value="E:updatefiles"/>

  </appSettings>

后台代码获取:

ConfigurationManager.AppSettings["ServicePath"].ToString().Trim();

原文地址:https://www.cnblogs.com/chuhaida/p/3193683.html