Open web.config from console application?

后端 未结 4 1824
萌比男神i
萌比男神i 2020-12-13 05:09

I have a console capplication that runs on the same computer that hosts a bunch of web.config files. I need the console application to open each web.config file and decrypt

4条回答
  •  天命终不由人
    2020-12-13 05:43

    I think you want to use WebConfigurationManager class with its OpenWebConfiguration method.

    It takes a path to the web.config and should open it just like it would in a HTTPContext based application.

提交回复
热议问题