简体   繁体   English

IIS上的动态WCF服务耦合

[英]Dynamic WCF service coupling on IIS

I am trying to build a service mechanism which should be add-on based and communicating through a publish subscribe system. 我正在尝试构建一个服务机制,该机制应该是基于附加组件并通过发布订阅系统进行通信。 It must be based on WCF services. 它必须基于WCF服务。 What I have right now is a concept which I can't get to work so I decided to ask you because maybe I am going at this the wrong way (I only just started using WCF). 我现在所拥有的是一个我无法工作的概念所以我决定问你,因为我可能会以错误的方式(我刚刚开始使用WCF)。

What I want to achieve is making a single core service with session persistency which can be extended by linking an unknown number of add-on services. 我想要实现的是创建具有会话持久性的单核服务,可以通过链接未知数量的附加服务来扩展。 I want to set up the publish subscribe system at runtime, not at buildtime, so the core-service should be able to detect what add-on services are available (using the web.config?) and then bind them to the message bus. 我想在运行时而不是在构建时设置发布订阅系统,因此核心服务应该能够检测哪些附加服务可用(使用web.config?)然后将它们绑定到消息总线。

From the front end (ASP classic) it must be possible to access any .svc file but, maintaining session, each .svc file must be connected to the message bus. 从前端(ASP经典),必须可以访问任何.svc文件,但是,维护会话,每个.svc文件必须连接到消息总线。

All is hosted in a single IIS active directory. 全部托管在一个IIS活动目录中。

Can you give me some hints as to where to look? 你能给我一些关于在哪里看的提示吗?

I am especially interesed in: 我特别喜欢:

  • WCF dynamic discovery WCF动态发现
  • WCF to WCF communication on the same host (in the same active directory even) WCF到同一主机上的WCF通信(甚至在同一个活动目录中)

Thanks in advance, hope you can help! 在此先感谢,希望你能帮忙!

Update 更新

Thanks for your answers, I'll read up at the links you send me. 感谢您的回答,我会在您发送给我的链接上阅读。 I'll post my final concept solution here in due time for future reference. 我将在适当的时候发布我的最终概念解决方案以供将来参考。

I was having a similar problem since I have one common WCF service but the implementation depends on the user's role so it was kind of difficult to do that at runtime. 我有一个类似的问题,因为我有一个常见的WCF服务,但实现取决于用户的角色,所以在运行时很难做到这一点。 I found this tutorial on the matter which runs great for my propouses: http://blog.micic.ch/net/dynamic-iis-hosted-wcf-service 我找到了关于这个问题的教程,这个问题对我的老板很有用: http ://blog.micic.ch/net/dynamic-iis-hosted-wcf-service

I have tested in my env and is very powerful technique. 我已经在我的环境中进行了测试并且是非常强大的技术。 Hope that helps you as well. 希望对你有所帮助。 Cheers. 干杯。

My 2 cents about Publish subscribe mechanism using WCF - WCF is not inherently built for pub/sub mechanism. 关于使用WCF发布订阅机制的2美分 - WCF本身并不是为pub / sub机制构建的。 It is built for Request/Response model of communication. 它是为请求/响应通信模型而构建的。 Have a look at the NService Bus for pub/sub here 这里看一下pub / sub的NService总线

Talking about Add on services on top of core service, I am not able to get What you want exactly ? 谈论在核心服务之上添加服务,我无法得到您想要的内容? Is it the Routing service which you want ? 它是您想要的路由服务吗? WCF 4 now provides routing service For more information look here The link also talks in detail about the discovery mechanism in WCF 4. WCF 4现在提供路由服务。有关更多信息,请参阅此处链接还详细讨论了WCF 4中的发现机制。

Also have a look the Agatha framework which also have single WCF service and no. 还看看Agatha框架,它也有单一的WCF服务,没有。 of request handlers where in the framework will decide which request handler to call based on each request. 请求处理程序,在框架中将根据每个请求决定调用哪个请求处理程序。

Search for Agatha - Davy brion for more information 搜索Agatha - Davy brion了解更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM