控制台应用程序中的 ConfigurationErrorsException
条目“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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现这是由旨在通用的自定义 ConfigurationCollection 类引起的。
This was discovered to be caused by a custom ConfigurationCollection class intended to be generic.