ASP.NET 配置文件模板

发布于 2024-07-21 23:44:35 字数 161 浏览 4 评论 0原文

是否可以有多个个人资料模板?

我正在为一家公司开发一个内部应用程序,该应用程序将分布到多个地点并具有不同的设置。 我正在考虑为用户首选项创建一个配置文件,然后使用配置文件系统来存储系统配置信息(我不想加载带有配置信息的 web.config 文件),但是我需要两个单独的配置文件模板。

Is it possible have more than one profile template?

I'm working on an internal application for a company that will be distributed to multiple locations and have different setups. I was thinking of having a profile for user preferences, and then using the profile system to store system configuration information (I didn't want to load the web.config file down with configuration information), however I would need two separate profile templates.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌伤浅笑 2024-07-28 23:44:35

web.config 是存储应用程序设置的理想位置。 如果您部署到一个场并需要一个中心位置,那么数据库可能是另一种可能性。

您可以使用 appsetting 的文件属性,如下所述此处 如果需要,可以从 web.config 外部化实际配置。

您还可以使用 configsource 属性来将配置部分存储在外部文件中。

The web.config is the ideal location to store application settings. If your deploying to a farm and want a central location then a database might be another possibility.

You can use the appsetting's file attribute as described here to externalize the actual configuration from the web.config if you need.

You can also use the configsource property to store a configuration section in an external file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文