Spring.Net WebApplicationContext

I was tring to use Spring.Net to configure an authentication application that i have been working on. The idea was to have a single-sign on webservice exposed by Spring and also have the client dynamically proxy the service via the same interface. This was all going well until the application would hang at load time with a timeout connection trying to download the webservice wsdl.

First i narrowed the problem to when spring started, which was when the application initialised a custom membership provider. I could also get to the webservice okay via the browser, so it must have been a context issue. I dropped the dependancy injection and created the webservice client in code and things worked fine. Next i ditched the AOP advice around the service.

Finally i removed a piece of code i had custom loading the webcontext and replaced it with:

            IApplicationContext ctx = WebApplicationContext.Current;

This did the trick, but how much time did i waste because of some legacy code i had for a work around for an older version on Spring.NET. Note to self, always work with the latest nightly build.

No comments: