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 7771257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:36:25+00:00 2026-06-01T16:36:25+00:00

I am trying to make a simple WCF RESTful for the first time to

  • 0

I am trying to make a simple WCF RESTful for the first time to be consumed via JSON. I have my interface below, but what would be the URL I would call to invoke my MemberLogon() method?

I thought it would be this:

http://localhost:49701/Exchange.svc/?membershipNumber=6519548&blah=abc

but I get a 404. I have a feeling it is to do with my service configuraiton in my Web.Config. Help!

My interface and class is:

[ServiceContract]
public interface IExchange
{
    [System.ServiceModel.OperationContract(Name = "MemberLogon")]
    [WebInvoke(UriTemplate = "/?membershipNumber={membershipNumber}&blah={blah}", Method = "GET", ResponseFormat = WebMessageFormat.Json)]
    Member MemberLogon(string membershipNumber, string blah);
}

[System.Runtime.Serialization.DataContract]
public class Member
{
    [System.Runtime.Serialization.DataMember]
    public string Username { get; set; }
}

Configuration is:

  <system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="MyNamespace.MyClass.ExchangeBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service behaviorConfiguration="MyNamespace.MyClass.ExchangeBehavior" name="MyNamespace.MyClass.Exchange">
    <endpoint address="" binding="webHttpBinding" contract="MyNamespace.MyClass.IExchange" />
  </service>
</services>

  • 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-06-01T16:36:26+00:00Added an answer on June 1, 2026 at 4:36 pm

    The code and interface look good. Can you try this configuration?

    <system.serviceModel>
                <behaviors>
                  <endpointBehaviors>
                    <behavior name="MyNamespace.MyClass.ExchangeBehavior">
                      <webHttp/>
                    </behavior>
                  </endpointBehaviors>
                </behaviors>
                <services>
                  <service name="MyNamespace.MyClass.Exchange">
                    <endpoint address="" binding="webHttpBinding" behaviorConfiguration="MyNamespace.MyClass.ExchangeBehavior" contract="MyNamespace.MyClass.IExchange" />
                  </service>
                </services>
           </system.serviceModel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to make simple minesweeper game in python, but have one problem. I have
I am trying to make simple testing but failed because I have no clue
I am trying to make my WCF service method to return JSON-object, but it
I'm trying to make some simple XML with Java and org.w3c.dom, but I got
I'm trying to make a simple drawing app in c++, but i'm having trouble
I'm trying to make simple animation that would repeat several times (or infinitely). It
I'm trying to make a WCF service that will work with JSON-P (long-story short,
I trying to make a simple image gallery, where I have several radio button
I'm trying to make simple templating for users on a site. I have a
Trying to make something simple in JS. Lets say I have two images, I

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.