我有一个ASP.NET Web应用程序,它编译并使用一些引用,例如Spring.Web
,Spring.Core
,Spring.Aop
,Spring.Core
和Spring.Services
。相应的 dll 位于bin
文件夹中。当我使用Internet Explorer启动Web应用程序时,我遇到了以下异常:
Error creating context 'spring.root': An exception occurred in the type initializer of 'Spring.Objects.Factory.Support.WebObjectFactory'.
the inner exception
TypeInitializationException: An exception occurred in the type initializer of 'Spring.Objects.Factory.Support.WebObjectFactory'.
ConfigurationErrorsException: WebSupportModule not initialized. Did you forget to add <add name = "Spring" type = "Spring.Context.Support.WebSupportModule, Spring.Web" /> to your web.config's <httpModules> -section?
这是我的 webConfig
的相关部分on httpModules><br>
i put the add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <br>
i put the add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/> <br>
i put the add name="BRF" type="BRF.Core.Web.BRFHttpModule, BRF.Core.Web"/><br>
this is the end of httpModules> <br>
但我做得对,所以我不明白为什么会发生异常。 我该怎么办?