控制台应用程序中的 ConfigurationErrorsException

发布于 2024-08-08 13:02:33 字数 400 浏览 1 评论 0原文

条目“MyCustomElement”已添加。

C:\Projects\Sandbox\Sandbox.Console\bin\Debug\Sandbox.Console.vshost.exe.config line 52

我对这个有点难住了。这个控制台应用程序在过去几周添加了相当多的自定义配置部分,没有出现任何问题。我们已经运行该应用程序一段时间了,最​​近(在过去两天内)我们遇到了这个问题。

我读到过有关安装 3.5、虚拟目录等后较旧的 Web 应用程序发生这种情况的信息。但是,我们这里一直是 3.5,这是一个控制台应用程序。

最近发生的唯一变化是添加了新的自定义配置部分。当错误发生时,我们自然地删除了该部分,但是随后返回了错误,并将以下配置部分(以前有效)命名为罪魁祸首。

The entry 'MyCustomElement' has already been added.

C:\Projects\Sandbox\Sandbox.Console\bin\Debug\Sandbox.Console.vshost.exe.config line 52

I'm a bit stumped on this one. This console app has had quite a few custom config sections added over the past few weeks with no issue. We've run the app for some time and just recently(within the past two days) we've bumped into this issue.

I've read about this happening to older web apps after installing 3.5, virtual directories, etc. However, we've always been 3.5 here and this is a console app.

The only change that occurred recently was the addition of a new custom config section. When the error occurred, we naturally removed that section, however the error was then returned naming the following config section(previously working) as the culprit.

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

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

发布评论

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

评论(1

蓝眼泪 2024-08-15 13:02:33

发现这是由旨在通用的自定义 ConfigurationCollection 类引起的。

This was discovered to be caused by a custom ConfigurationCollection class intended to be generic.

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