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

  • SEARCH
  • Home
  • 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 937061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:24:51+00:00 2026-05-15T21:24:51+00:00

I am using WCF REST Start kit to build a RESTFul service. I defined

  • 0

I am using WCF REST Start kit to build a RESTFul service. I defined a service like this:

namespace MyNS {
  [ServiceBehavior(IncludeExceptionDetailInFaults = true, 
   InstanceContextMode = InstanceContextMode.Single,
   ConcurrencyMode = ConcurrencyMode.Single)]
  [AspNetCompatibilityRequirements(
   RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
  public class MyService : MyCollectionServiceBase, IMyCollectionServiceBase 
  {...}
}

MyCollectionServiceBase and IMyCollectionSeviceBase are defined like this:

namespace MyNS.Contract {
  [ServiceContract]
  public interface IMyCollectionServiceBase<TItem> where TItem : class 
  {...}

  // COllectionServiceBase is an abstract class in 
  // Microsoft.ServiceModel.Web.SpecializedServices
  public abstract class MyCollectionServiceBase<TItem> :
    CollectionServiceBase<TItem>
    where TItem : class
  {...}
}

and here is a section of service in my Web.config

<serviceBehaviors>
  ...
  <behavior name="MyNS.MyService1Behavior">
    <serviceMetadata httpGetEnabled="true" />
    <serviceDebug includeExceptionDetailInFaults="false" />
  </behavior>
</serviceBehaviors>
...
<service behaviorConfiguration="MyNS.MyService1Behavior"
  name="MyNS.MyService1">
  <endpoint address="" binding="wsHttpBinding" 
    contract="MyNS.IMyService1">
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>
  <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

When I test my service by using “http://localhost:1290/MyService.svc/“, I got error message saying:

The contract name 'MyNS.Contract.IMyCollectionServiceBase' could not be found 
in the list of contracts implemented by the service 'MyService'.

I am not sure if the endpoint is not matched or something is missing?

  • 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-15T21:24:52+00:00Added an answer on May 15, 2026 at 9:24 pm

    You should read the An Introduction To RESTful Services With WCF article (MSDN Magazine, January 2009 issue) for an introduction.

    Your current service config is using wsHttpBinding which is not REST (but SOAP instead) – you need ot use webHttpBinding instead.

    Also, in order to have a RESTful service, you need to decorate your service operations with either a [WebGet] or a [WebInvoke] attribute and optionally provide parameters to define how exactly that HTTP URI should be called and should react.

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

Sidebar

Related Questions

I am using WCF REST service (GET method) to retrieve my EF4 POCOs. The
I am trying to create a logging service using WCF Rest. It looks something
I was looking at using the WCF REST Service Application template to host all
I have created a REST service using WCF for communicating with BLL/DAL from UI.
Using WCF in a RESTful way seems great. I’m a big fan of the
I like using WCF callbacks when I can because to me it is better
I am building a Web service using WCF as a way to provide access
Using the WCF web programming model one can specify an operation contract like so:
We are using a WCF service layer to return images from a repository. Some
I load data into my grid using a WCF service. When a user clicks

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.