ASP.net:web.config导入到txt或excel

发布于 2024-09-30 10:35:24 字数 164 浏览 0 评论 0原文

对于我的所有应用程序,我需要制作一个文档,其中包含所有使用的端点和数据库连接。

我是手动做的。 有什么方法可以让我们从 web.config 文件中读取并提取信息。

任何想法。

编辑: 是否可以以这样的方式只出现所需的数据,在我的例子中是 DBName 和端点地址

for all my Application , I need to make a document , that will contains all endpoints and database connections are used.

I was doing it manually.
is there any way , so that we can read and extract information from web.config files.

Any idea.

Edit:
Can it be in such a way that only required data come's up , in my case DBName and endpoints address

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

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

发布评论

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

评论(1

爱给你人给你 2024-10-07 10:35:24

web.config 文件是 XML 文件,因此您可以使用任何支持 XML 的编辑器并提取类似的信息。

正如您提到的 Excel:Excel 也可以打开 XML 文件。当我尝试打开 web.config 时,我有以下选择:

alt text

选择“作为 XML 表”并让 Excel 为我生成架构 我将所有 web.config 数据保存在格式良好的 Excel 表中。

web.config files are XML files, so you can take any editor capable of XML and extract the information like that.

As you mentioned Excel: Excel can open XML files as well. When I try to open a web.config I have the following choices:

alt text

After choosing "As an XML table" and having Excel generate a Schema for me I have all the web.config data in a nicely formatted Excel table.

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