2017-07-04 109 views
1

我引用使用configSource屬性我的web應用程序的設置爲appSettings元素:如何確定在web.config中的AppSettings文件的路徑

<appSettings configSource="c:/settings/customer-settings.config"></appSettings> 

我現在想訪問此路徑編程使用配置對象:

Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); 

但是configSource路徑似乎不可用?

回答

相關問題