Dynamically change connectionString in web.config

前端 未结 4 1273
無奈伤痛
無奈伤痛 2020-12-19 22:11

I have the following in my web.config


   

        
4条回答
  •  一整个雨季
    2020-12-19 22:24

    • It's a bad idea to modify a *.config file from inside the program.
    • It's a bad idea for a webpage to modify any file in the root folder of your website.
    • It's a bad idea to have permission set allowing a web page the modification of files in the root folder of your website.

    Basically, you need to forget about the web.config, and structure your code to use a connection string the exist only in memory.

提交回复
热议问题