1

次のエラーが発生し続けます。

Method not found: 'Void Castle.MicroKernel.ComponentActivator.ComponentActivatorException..ctor

これは、global.asaxの次の初期化コードからのものです。

    private void ConfigureContainer()
    {
        _container = new WindsorContainer();

        _container.Register(Component.For<IWindsorContainer>().Instance(_container))
            .AddFacility<WcfFacility>()
            .Register(Component.For<ISonatribeCommandService>()
                          .AsWcfClient(DefaultClientModel
                          .On(WcfEndpoint.FromConfiguration("commandServiceClient")))
                          .LifestyleTransient())
            .Install(FromAssembly.InDirectory(new AssemblyFilter(HttpRuntime.BinDirectory, "Sonatribe*.dll")));

    }

web.configのsystem.servicemodelセクションは次のようになります。

  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <client>
      <endpoint address="http://****.com/SonatribeCommandService.svc" binding="basicHttpBinding" contract="CommandService.ISonatribeCommandService" name="commandServiceClient"></endpoint>
    </client>
  </system.serviceModel>

このサービスは、Web参照の追加メソッドを使用すると正常に機能します。

アップデート:

私もconfigメソッドを試してみました:

<configuration>
  <components>
    <component 
      id="commandService" 
      type="CommandService.SonatribeCommandService, CommandService"
      wcfEndpointConfiguration="commandServiceClient" />
  </components>
</configuration>

何か案は?

4

1 に答える 1

2

互換性のないバージョンのWindsorと機能を使用しているようです。お使いのウィンザーのバージョンで使用することを目的としたバージョンのWCFファシリティを使用していることを確認してください。

于 2011-11-20T21:47:02.467 に答える