Consume a WCF Web Service in Sharepoint Services 3.0

Posted by Filip Ekberg on Stack Overflow See other posts from Stack Overflow or by Filip Ekberg
Published on 2010-03-29T06:07:31Z Indexed on 2010/03/29 6:13 UTC
Read the original article Hit count: 713

Filed under:
|
|
|
|

I've seen this question and since it doesn't answer my question and the topic is fairly miss-leading in my opinion, I feel the urge to ask this again.

I have a Sharepoint Webpart that I deploy using Visual Studio Sharepoint Tools 1.2 to a Sharepoint Services 3.0 instance on my local Windows 2003 server. All works great, however, as soon as I add a WCF Service it won't run the code. All I get is a File not found error.

I've added this to my Web.Config which is a copy of App.Config

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_Services_xxxService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:1196/xxxService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ervices_xxxgService" contract="xxxService.TestService" name="BasicHttpBinding_ServicesxxxService" />
    </client>
  </system.serviceModel>

I cannot even do using(var proxy = new xxService.TestService()), If that line is added, the new dll is not added to Sharepoint Services.

Any suggestions?

I also found this blog post and this forum thread, don't think they are too helpful though.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#