All that you need to do is to configure the IApplicationContext instance for your service in the same manner as you would for any other application that is configured from its App.Config file (e.g., a console app, etc.).
Add the following section handler to your App.Config file's <configSections> node:
HTML Code:
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
</sectionGroup>
This tells the context that its config is to be found in a node named <spring> in the App.Config file. Then add this <spring> node under the <configuration> node as follows:
HTML Code:
<spring>
<context>
<!-- your objects, resources etc. here; examples: -->
<resource uri="~/Config/objects.xml"/>
<resource uri="~/Config/aspects.xml"/>
</context>
</spring>
Once this is done, you should be able to return the context from your call to...
Code:
IApplicationContext ctx = ContextRegistry.GetContext();
...as expected in your service's Main() method.
Let me know if this fails to work for you.
-Steve B.