Castle Windsor:在配置中检测到循环

时间:2013-07-17 10:08:56

标签: inversion-of-control castle-windsor

我正在使用城堡windsor通过xml配置..最近在构造函数输入参数中添加新依赖项后出现此错误..任何想法我如何在windsor依赖xml文件中提供覆盖..

Cycle detected in configuration.
Component class1 has a dependency on class2 but it doesn't provide an override.
You must provide an override if a component has a dependency on a service that it - itself - provides

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IOrderApplicationService.method1()
   at OrderApplicationServiceClient.method1()

1 个答案:

答案 0 :(得分:0)

您是否尝试过详细in the documentation的方法?