Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 744381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:58:18+00:00 2026-05-14T08:58:18+00:00

I am consuming a WCF Service from a webpart in Sharepoint 2007. But its

  • 0

I am consuming a WCF Service from a webpart in Sharepoint 2007. But its giving me the following error:

There was no endpoint listening at
http://locathost:2929/BusinessObjectService
that could accept the message. This is
often caused by an incorrect address
or SOAP action. See InnerException, if
present, for more details. —>
System.Net.WebException: The remote
server returned an error: (404) Not
Found.

My Binding Details in the WCF web.config is:

<system.serviceModel>
    <diagnostics performanceCounters="All">
      <messageLogging logEntireMessage="true" logMessagesAtServiceLevel="false"
        maxMessagesToLog="4000" />
    </diagnostics>
    <services>
      <service behaviorConfiguration="MyService.IBusinessObjectServiceContractBehavior"
        name="MyService.BusinessObjectService">
        <endpoint address="http://localhost:2929/BusinessObjectService.svc"
          binding="wsHttpBinding" contract="MyService.IBusinessObjectServiceContract">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="MyService.IBusinessObjectServiceContractBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

My binding details in the Sharepoint site web.config is:

<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IBusinessObjectServiceContract"
                    closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
                    sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false"
                    hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
                    maxReceivedMessageSize="65536" messageEncoding="Mtom" textEncoding="utf-8"
                    useDefaultWebProxy="true" allowCookies="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
          <security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None"
                realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
                algorithmSuite="Default" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:2929/BusinessObjectService.svc"
          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IBusinessObjectServiceContract"
          contract="BusinessObjectService.IBusinessObjectServiceContract"
          name="WSHttpBinding_IBusinessObjectServiceContract">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>

I am able to view the WCF (and its wsdl) in browser, using the URL given in the end point. So, I guess the URL is definately correct. Please help !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:58:19+00:00Added an answer on May 14, 2026 at 8:58 am

    I’ve replicated your code and it runs correctly for me, but there are a couple of discrepencies.

    Firstly, the server side configuration you’ve supplied is not complete. The endpoint mex fails because I don’t have the IMetadataExchange contract. When you browse to the WSDL, this is presumably the endpoint you are viewing.

    I’m just removing this endpoint altogether. Following from this, I’m specifying an address for the serviceMetadata element in the behavior like this:

    <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:2929/BusinessObjectService.svc?wsdl" />

    Not ideal but it works to let me discover the service. Then my generated client config file is the same as yours, except…

    Secondly, I have messageEncoding="Text" instead of messageEncoding="Mtom"

    Try changing messagingEncoding to Text. You haven’t specified on server side that it should be Mtom so I don’t understand why it has been generated on client side as Mtom.

    Apart from these two issues my configuration is the same as yours, and it runs without a problem. I’m not sure that the second issue I’ve identified is a real issue at all (I can’t see how the metadata exchange would give the wrong message encoding), but the first issue is stopping the service from running on my side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When consuming a .NET WCF webservice I get the following response (error): Unsupported HTTP
I have a WCF web service using wsHttpBinding that I am consuming from a
I am consuming a WCF service from a WP7 app. Both are in a
I have found 2 ways of consuming a WCF service without the help from
I'm having hard time consuming a secure WCF Web Service from a PHP site.
We've got a WCF service that we're consuming from a web app. The client
I am consuming a WCF service from another company, and it is returning an
I am consuming a Java Web Service as a WCF service from .NET. The
I have a Silverlight 2 application that is consuming a WCF service. As such,
I have two WCF clients consuming a 3rd party web service. These two clients

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.