English 中文(简体)
生育率 内容
原标题:WcfFacility Sequence contains no elements

我在试图安装我的轮椅时,没有发现任何错误。

这里是我全球的守则。 页: 1

_container = new WindsorContainer();

_container.Register(Component.For<IWindsorContainer>().Instance(_container))
          .AddFacility<WcfFacility>()
          .Install(Configuration.FromAppConfig())
          .Install(FromAssembly.InDirectory(new AssemblyFilter(HttpRuntime.BinDirectory, "Web*.dll")));

这里是我的系统。 网上服务模块:

<system.serviceModel>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  <client>
    <endpoint address="http://commandservice.website.com/WebsiteCommandService.svc" binding="basicHttpBinding" contract="CommandService.IWebsiteCommandService" name="commandServiceClient"></endpoint>
  </client>
</system.serviceModel>

这里是我的城堡座(在网上)。

<castle>
    <components>
      <component
          id="commandService"
          type="CommandService.WebsiteCommandService, CommandService"
          wcfEndpointConfiguration="commandServiceClient" />
    </components>
</castle>

我失踪了一点明显吗?

最新资料:

这里的痕迹是:

[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.Single(IEnumerable`1 source) +371
   Castle.Facilities.WcfIntegration.WcfClientExtension.ObtainServiceContract(ComponentModel model, IWcfClientModel clientModel) in c:TeamCityuildAgentworka19756d977ce9d2csrcCastle.Facilities.WcfIntegrationClientWcfClientExtension.cs:239
   Castle.Facilities.WcfIntegration.WcfClientExtension.ResolveClientModel(ComponentModel model) in c:TeamCityuildAgentworka19756d977ce9d2csrcCastle.Facilities.WcfIntegrationClientWcfClientExtension.cs:234
   Castle.Facilities.WcfIntegration.WcfClientExtension.Kernel_ComponentModelCreated(ComponentModel model) in c:TeamCityuildAgentworka19756d977ce9d2csrcCastle.Facilities.WcfIntegrationClientWcfClientExtension.cs:189
   Castle.MicroKernel.ComponentModelDelegate.Invoke(ComponentModel model) +0
   Castle.MicroKernel.DefaultKernel.AddCustomComponent(ComponentModel model, Boolean isMetaHandler) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelDefaultKernel.cs:281
   Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelDefaultKernel.cs:536
   Castle.Windsor.WindsorContainer.Register(IRegistration[] registrations) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorWindsorWindsorContainer.cs:482
   Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents(IConfiguration[] configurations, IWindsorContainer container, IConversionManager converter) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorWindsorInstallerDefaultComponentInstaller.cs:211
   Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers, DefaultComponentInstaller scope) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorWindsorWindsorContainer.cs:317
   Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorWindsorWindsorContainer.cs:453
   Website.MvcApplication.ConfigureContainer() in C:UsersWayne DouglasDevProjectWebsiteWebsiteGlobal.asax.cs:65
   Website.MvcApplication.Application_Start() in C:UsersWayne DouglasDevProjectWebsiteWebsiteGlobal.asax.cs:53

[HttpException (0x80004005): Sequence contains no elements]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4052053
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +352
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375

[HttpException (0x80004005): Sequence contains no elements]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11686928
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4863749

附录

这个问题似乎有些地方,它像它试图解决这一组成部分一样,因为它是一个正常的物体,而不是一种 w。 避免服务发挥作用——在试图利用 w子解决问题时,在轨迹上有错误:

    public WebSiteCommandService(ICommandService service)
    {
        _service = service;
    }

它说,国际商业服务没有任何组成部分。

为什么客户集装箱试图解决这一问题?

就像 w子一样,它正在完全跳出吗?

下面是一栏:

[InstanceNotFoundInEnvironmentConfigurationException: Could not find requested type Ncqrs.Commanding.ServiceModel.ICommandService in the NcqrsEnvironment configuration. Make sure that the NcqrsEnvironment is configured correctly or that defaults are correctly set.]
   Ncqrs.NcqrsEnvironment.Get() in C:UsersWayne DouglasDevProjectWebsiteThirdPartyNCQRSsrcNcqrsNcqrsEnvironment.cs:96
   CommandService.WebsiteCommandService..cctor() in C:UsersWayne DouglasDevProjectWebsiteCommandServiceWebsiteCommandService.svc.cs:17

[TypeInitializationException: The type initializer for  CommandService.WebsiteCommandService  threw an exception.]
   System.Runtime.Serialization.FormatterServices.nativeGetUninitializedObject(RuntimeType type) +0
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorDefaultComponentActivator.cs:151

[ComponentActivatorException: ComponentActivator: could not instantiate CommandService.WebsiteCommandService]
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorDefaultComponentActivator.cs:163
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorDefaultComponentActivator.cs:116
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorDefaultComponentActivator.cs:66
   Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorAbstractComponentActivator.cs:80
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelLifestyleAbstractLifestyleManager.cs:81
   Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelLifestyleSingletonLifestyleManager.cs:63
   Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelHandlersDefaultHandler.cs:124
   Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelHandlersDefaultHandler.cs:98
   Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveCore(CreationContext context, ComponentModel model, DependencyModel dependency) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelResolversDefaultDependencyResolver.cs:308
   Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelResolversDefaultDependencyResolver.cs:158
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorDefaultComponentActivator.cs:292
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorDefaultComponentActivator.cs:85
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorDefaultComponentActivator.cs:66
   Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelComponentActivatorAbstractComponentActivator.cs:80
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelLifestyleAbstractLifestyleManager.cs:81
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelLifestyleAbstractLifestyleManager.cs:70
   Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelHandlersDefaultHandler.cs:124
   Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelHandlersDefaultHandler.cs:98
   Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelDefaultKernel.cs:777
   Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) in d:BuildAgentwork60b7fa65294e7792srcCastle.WindsorMicroKernelDefaultKernel_Resolve.cs:225
   Website.WindsorControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in C:UsersWayne DouglasDevProjectWebsiteWebsiteWindsorControllerFactory.cs:24
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +93
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +346
   System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +71
   System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +19
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +161
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +405
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375
问题回答

我认为你的制度。 您的网页内容。 混淆并不正确。 如果你从你的网络应用程序中接收服务,那么你就不会有客户,而不是客户内容,我认为,你应该有这样的服务内容:

<services>
  <service name="CommandService.WebsiteCommandService">
    <endpoint address="http://commandservice.website.com/WebsiteCommandService.svc"
              binding="basicHttpBinding"
              name="commandService"
              contract="CommandService.IWebsiteCommandService" />
  </service>
</services>   

最后,我开始这项工作!

部件组合的类型需要接口——服务。 我离开了服务岗位,并投入行动!

And the system.servicemodel worked with client config.

Don t know if this is a bug?





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签