【发布时间】:2012-01-31 00:21:21
【问题描述】:
我编写了一个 WCF 服务,该服务在我希望在其中使用的解决方案之外。我这样做是为了拥有一项可在许多解决方案中重复使用的服务。我们已经多次将此服务复制为解决方案的 asmx 组成部分,这不是一个好的维护方案。我终于有时间以正确的方式解决这个问题。任何帮助将不胜感激!我看到的所有关于此的帖子都让我陷入困境。我的解决方案(和服务)在 VS2010、Framework 4.0、vb.net 中。
当在端点中使用 webHttpBinding 绑定时,当我将服务添加到我的解决方案时,会添加引用,但 web.config 没有与所需的 system.serviceModel 配置组一起添加。我能找到的所有文章都在谈论将服务作为解决方案的一部分,但这是我试图避免的。
有什么想法吗?这是我的服务 web.config 的 system.serviceModel 部分:
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="AspNetAjaxBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<services>
<service name="Com.mydomain.Services.WCF_ACE.ACE">
<endpoint address=""
behaviorConfiguration="AspNetAjaxBehavior"
binding="webHttpBinding"
contract="Com.mydomain.Services.WCF_ACE.I_ACE" />
</service>
</services>
【问题讨论】:
-
AutoCompleteExtender 与您的 wcf 服务问题有什么关系?
标签: vb.net wcf visual-studio-2010 frameworks