How get web config location element?

后端 未结 5 659
忘掉有多难
忘掉有多难 2021-01-19 00:06

How get web config location element?

ConfigurationManager.GetSection(\"appSettings\") returns Okay

ConfigurationManager.GetSection(\"location\") return null         


        
5条回答
  •  孤街浪徒
    2021-01-19 00:55

    Not sure if this is exactly what you want but you can get sections within the web.config location element like so...

    AuthorizationSection pageAuthorizationSection = (AuthorizationSection)WebConfigurationManager.GetSection("system.web/authorizati‌​on", "FOLDER/Page2.aspx");
    

提交回复
热议问题