在SharePoint2010中使用WCF服务 [英] Consuming WCF service in SharePoint2010

查看:58
本文介绍了在SharePoint2010中使用WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi
我试图通过Webparts在Sharepoint 2010中使用WCF服务。我按照这个链接来做这件事。



http://www.c-sharpcorner.com/Forums/Thread/182472/how-to-create-deploy-and-consume- wcf-service-in-sharepoint.aspx



但是我在客户端添加服务引用时无法发现Service.svc。它显示有关元数据的错误。



任何人都可以帮忙吗?

这是我的web.config文件

Hi Im trying to consume a WCF service in Sharepoint 2010 through Webparts. I followed this link for doing it.

http://www.c-sharpcorner.com/Forums/Thread/182472/how-to-create-deploy-and-consume-wcf-service-in-sharepoint.aspx

But I''m not able to discover the Service.svc while adding service reference in the client. It shows error regarding metadata.

Can anyone help Please??
This is my web.config file

<configuration>
 
  <system.servicemodel>
 
    <behaviors>
 
      <servicebehaviors>
 
        <behavior name="WcfService.RevertServiceServiceBehavior">
 
          <servicemetadata httpgetenabled="true" />
 
          <servicedebug includeexceptiondetailinfaults="false" />
 
        </behavior>
 
      </servicebehaviors>
 
    </behaviors>
 
    <services>
 
      <service behaviorconfiguration="WcfService.RevertServiceServiceBehavior">
 
          name="WcfService.RevertService">
 
        <endpoint address="" binding="basicHttpBinding" contract="WcfService.IRevert">
 
          <identity>
 
            <dns value="localhost" />
 
          </identity>
 
        </endpoint>
 
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
 
      </service>
 
    </services>
 
  </system.servicemodel>
 
</configuration>



Thanks Suresh

推荐答案

http://ukreddysharepoint2010.blogspot.in/2012/06/how-to-create-deploy-an d-consume-wcf.html [ ^ ]


这篇关于在SharePoint2010中使用WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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