I have recently started working on an ASP.NET MVC project that uses Castle Windsor. The problem is, each time I try to debug the application, this part of code takes a couple of minutes to execute:
protected override IController GetControllerInstance(
RequestContext requestContext, Type controllerType)
{
if (controllerType == null)
{
throw new HttpException(404, "some error");
}
// this takes long...
return (IController)kernel.Resolve(controllerType);
}
If anyone encountered a similar situation and could share a solution to this, it would br great, since this situation practically hold me from using debugger...
I'm using VS2012, the project is on .NET Framework 4.5 and the version of Castle.Core and Castle.Windsor is 3.1
EDIT: OK, I found that the problem was not related to the container, it was actualy a matter of NLog settings - in NLog.config I had internalLogLevel set to "Trace" - I changed the level to "Error" and everything runs smoothly. Sorry for taking time to anybody, who was trying to solve my issue...