【发布时间】:2013-05-19 22:44:12
【问题描述】:
我在 web.config MVC Web 项目中添加了自定义配置部分,它工作正常。我在 Windows 服务项目下的 app.config 中做了同样的事情,它抛出了错误。
The type initializer for 'Quartz.Impl.StdSchedulerFactory' threw an exception
但是在删除自定义配置部分时,它可以正常工作而没有错误。
<configSections>
<section name="RegisterSchedule" type="Sample.Common.CustomConfig.RegisterScheduleConfig, Sample.Common.CustomConfig" />
<RegisterSchedule>
<Schedules>
<Schedule Name="TestSchedule1" Value="test" IsEnabled="true" />
<Schedule Name="TestSchedule2" Value="123" IsEnabled="true" />
</Schedules>
</RegisterSchedule>
【问题讨论】:
-
内部异常和堆栈跟踪是什么。如果您对此进行分析,您可以对这个问题有很多有意义的见解。
标签: c# windows-services app-config