我正在使用Spring.Net進行遠程處理。 我將App.config文件的名稱更改爲NewApp.config文件。 CopyAlways
屬性設置爲true。 IApplicationContext ctx = ContextRegistry.GetContext()
給出的錯誤爲 沒有上下文註冊。使用RegisterContext
方法或配置文件中的spring/context部分。SpringDotNet中沒有上下文註冊錯誤
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core" />
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
</sectionGroup>
</configSections>
<spring>
<context>
<resource uri="config://spring/objects" />
</context>
<objects xmlns="http://www.springframework.net">
<object></object>
</objects>
</spring>
代碼爲如下 - – user660232 2011-12-16 11:48:09