温莎城堡和 WCF REST 服务模板
我在创建 REST 服务方面还很陌生,但我一直在寻找新的“WCF REST 服务模板 40(CS)”....
但是我希望能够使用 Windsor Castle 和 Inceptors,但还没有真的不知道如何做到这一点......
新的“WCF REST 服务模板”似乎没有实现接口,那么我如何配置 Castle 来完成它的动态工作呢?
蒂亚·
索伦
I'm pretty new at creating REST services, but I've been looking to the new 'WCF REST Service Template 40(CS)'....
However I'd like to be able to use Windsor Castle and Inceptors, but haven't really been able to figure out how to do this.....
The new 'WCF REST Service Template' doesn't seem to implement an interface, so how do I configure Castle to do it's dynamic stuff?
TIA
Søren
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这不是一件简单的事情。您需要处理一些 WCF 扩展性机制并实现自定义 IInstanceProvider 行为,以将 Windsor 连接为 WCF 中的 IoC。我很久以前写过一篇关于如何使用 Microsoft 对象生成器执行此操作的文章,但您可以在 Windsor 中重用其中的大部分内容,
http://weblogs.asp.net/cibrax/archive/2007/12/13/wcf-dependency-injection-behavior.aspx< /a>
谢谢
巴勃罗.
It's not something simple to do. You need to deal with some WCF extensibility mechanisms and implement a custom IInstanceProvider behavior for hooking up Windsor as IoC in WCF. I wrote a post a long time ago about how to do this with the Microsoft Object Builder, but you can reuse most of it with Windsor,
http://weblogs.asp.net/cibrax/archive/2007/12/13/wcf-dependency-injection-behavior.aspx
Thanks
Pablo.
在这里找到了一个很好的例子:
http://codebetter.com/howarddierking/2010/01/19/vanilla-yet-composable-http-services-with-wcf-4-and-windsor/
Found a pretty good example here:
http://codebetter.com/howarddierking/2010/01/19/vanilla-yet-composable-http-services-with-wcf-4-and-windsor/