ASP.net:web.config导入到txt或excel
对于我的所有应用程序,我需要制作一个文档,其中包含所有使用的端点和数据库连接。
我是手动做的。 有什么方法可以让我们从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
web.config 文件是 XML 文件,因此您可以使用任何支持 XML 的编辑器并提取类似的信息。
正如您提到的 Excel:Excel 也可以打开 XML 文件。当我尝试打开 web.config 时,我有以下选择:
选择“作为 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:
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.