WCF温莎城堡
我正在使用 Wcf Facility,(windsor 2.5.2)上周来自 github 存储库的最新版本。
然而它不起作用并抛出以下错误(当服务启动时)
无法找到与具有绑定 WSHttpBinding 的端点的方案 http 相匹配的基地址。注册的基地址方案是[]。
设置
var container = new WindsorContainer();
container.AddFacility<WcfFacility>()
.Register(
Component.For<IUnitOfWork>().ImplementedBy<UnitOfWork>().LifeStyle.PerWcfOperation(),
Component.For<Session>().ImplementedBy<Session>().LifeStyle.PerWcfOperation(),
Component.For<IService1>().ImplementedBy<Service1>().AsWcfService(new DefaultServiceModel()).LifeStyle.PerWcfOperation());
这是将所有温莎内容删除回普通服务的
,它运行良好。错误在第 32 行的“Castle.Facilities.WcfIntegration.DefaultServiceHost”中抛出,
this.model = model;
谢谢
骨头
I am using the Wcf Facility, (windsor 2.5.2) latest version from github repo as of last week.
how ever it is not working throwing the following error (when the service starts up)
Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [].
here is the setup
var container = new WindsorContainer();
container.AddFacility<WcfFacility>()
.Register(
Component.For<IUnitOfWork>().ImplementedBy<UnitOfWork>().LifeStyle.PerWcfOperation(),
Component.For<Session>().ImplementedBy<Session>().LifeStyle.PerWcfOperation(),
Component.For<IService1>().ImplementedBy<Service1>().AsWcfService(new DefaultServiceModel()).LifeStyle.PerWcfOperation());
removing all the windsor stuff back to a vanilla service it works fine.
the error is thrown in "Castle.Facilities.WcfIntegration.DefaultServiceHost" on line 32
this.model = model;
thanks
bones
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎发生的事情是,在安装 Castle 时,它将开始创建服务,此时该服务没有传递给它的基地址(观察,我可能有点不正确)
我发现了另一篇开发人员使用的帖子
它似乎有效(我什至拍摄了一个快速视频)
我想我唯一的问题有“这是注册服务的正确方法吗?”维基和演示应用程序显示了不同的方法,这些方法不适用于视频中的示例。
What seemed to be happening, was on setup Castle would start to create the service, which at that point did not have the base address being passed to it (observation, I could have this a little incorrect)
i found another post where the developer used
it seems to work (I have even taken a quick video)
I guess the only question i have "is this the correct way of registering a service?" the wiki and demo app show different ways which do not work with the example in the video.