简体   繁体   中英

How to retrieve value from xml parameter in web.config file?

I am new to C# ASP.Net and am following the following guide to do logging https://blog.tallan.com/2017/07/18/log-management-with-log4net-and-microsoft-azure/

I am unsure how to retrieve value from xml attribute using Configuration Manager. The following is my web.config file and I would like to retrieve the following value and assign to the string variable in my.cs file. How do I go about it?

在此处输入图像描述

在此处输入图像描述

try this: ConfigurationManager.AppSettings[queueConnectionName]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM