且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在ASP.NET中使用C#在运行时更改web.config值时避免IIS或应用程序重新启动?

更新时间:2022-11-06 15:50:17

是的,但副作用对我来说是未知的,因为通常不会这样做。



更改外部文件中的配置示例| Microsoft Docs [ ^ ]



您还可以将您的appsettings存储在数据库中,我认为这可能是一个更可行的解决方案。
Yes, but the side effects are unknown to me because this isn't typically done.

Changing Configuration in External File Example | Microsoft Docs[^]

You could also store your appsettings in a database, which I think may be a more viable solution.

>