WCF温莎城堡

发布于 2024-10-26 02:34:52 字数 876 浏览 8 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

诗笺 2024-11-02 02:34:52

似乎发生的事情是,在安装 Castle 时,它​​将开始创建服务,此时该服务没有传递给它的基地址(观察,我可能有点不正确)

我发现了另一篇开发人员使用的帖子

Component.For<IService1>().ImplementedBy<Service1>().ActAs(new DefaultServiceModel().Hosted()).LifeStyle.PerWcfOperation()

它似乎有效(我什至拍摄了一个快速视频

我想我唯一的问题有“这是注册服务的正确方法吗?”维基和演示应用程序显示了不同的方法,这些方法不适用于视频中的示例。

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

Component.For<IService1>().ImplementedBy<Service1>().ActAs(new DefaultServiceModel().Hosted()).LifeStyle.PerWcfOperation()

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文