有没有一种方法可以添加具有多个服务激活的WCF无svc激活? [英] Is there a way to add WCF svc-less activation with multiple service Activations?

查看:101
本文介绍了有没有一种方法可以添加具有多个服务激活的WCF无svc激活?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出以下配置:

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" >
    <serviceActivations>
        <add relativeAddress="./UserService.svc" service="Mercato.KnowledgeKube.WebSvc.Service.KnowledgeuserManagerService" factory="Mercato.KnowledgeKube.WebSvc.WCF.KnowledgeServiceHostFactory" />
        <add relativeAddress="./ProductService.svc" service="Mercato.KnowledgeKube.WebSvc.Service.ProductManagerWebServices" factory="Mercato.KnowledgeKube.WebSvc.WCF.KnowledgeServiceHostFactory" />
   </serviceActivations>
</serviceHostingEnvironment>

两个./UserService中的第一个是可访问的,我可以创建对此的服务引用,但是ProductServce是不可调和的.我在这里做什么错了?

The first of the two ./UserService is reachable and I can create a Service Reference to it, but the ProductServce is not reconcilable. What am I doing wrong here?

编辑

这是例外:

 There was no endpoint listening at http://localhost/KnowledgeWebService/ProductService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.
If the service is defined in the current solution, try building the solution   
and adding the service reference again.

推荐答案

没有端点在侦听,因为......我没有使用相关属性对产品服务进行解构.我最初是在寻找更复杂的问题.

There wasn't an endpoint listening because......I hadn't decorared the product service with the relevant attributes. I was looking for more complex problems first.

这篇关于有没有一种方法可以添加具有多个服务激活的WCF无svc激活?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆