title: Spring.NET WCF AOP Performance Logging
body: <p>I have a MVC App where I inject my WCF service to the Controller using Spring.NET. Following is my configuration</p>
  
  <p><strong>MVC Client Web.Config</strong></p>
  
  <pre><code>&lt;wcf:channelFactory id="LoginService" channelType="App.Interfaces.Services.ILoginService, AppServiceInterfaces" endpointConfigurationName="EndPointLoginService"/&gt;
  
  &lt;endpoint name="EndPointLoginService" address="http://localhost:xxx/LoginService.svc" contract="App.Interfaces.Services.ILoginService" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding1" behaviorConfiguration="ServiceEndpointBehavior" /&gt;
  </code></pre>
  
  <p><strong>WCF Service Web.Config</strong></p>
  
  <pre><code>&lt;object id="LoginService" type= "App.Services.LoginService, AppLoginService" singleton="false"&gt;
  &lt;/object&gt;
  
  &lt;service name="LoginService" behaviorConfiguration="ServiceBehavior"&gt;
      &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding1" contract="App.Interfaces.Services.ILoginService" /&gt;
      &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
    &lt;/service&gt;
  </code></pre>
  
  <p><strong>Login Service.svc</strong></p>
  
  <pre><code>&lt;%@ ServiceHost Language="C#" Debug="true" Service="LoginService" Factory="Spring.ServiceModel.Activation.ServiceHostFactory" %&gt;
  </code></pre>
  
  <p>The above work perfectly fine. Now I wanted to implement Performance Logging for the above</p>
  
  <p>So I added the following in the WCF Service Web.Config</p>
  
  <pre><code>&lt;object id="performanceLoggingAroundAdvice" type="AOP.Advice.PerformanceLoggingAroundAdvice, AOP" singleton="false" scope="request"/&gt;
  </code></pre>
  
  <p>where I have a project called AOP.</p>
  
  <p>and </p>
  
  <pre><code>&lt;object id="LoginService" type= "App.Services.LoginService, AppLoginService" singleton="false"&gt;
  &lt;property name="InterceptorNames"&gt;
    &lt;list&gt;
      &lt;value&gt;performanceLoggingAroundAdvice&lt;/value&gt;
    &lt;/list&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p></p>
  
  <p>But I get an error..saying Initialization of Login Service failed. Can someone help me with the configuration.</p>