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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:08:27+00:00 2026-06-09T12:08:27+00:00

I have a WCF Rest service as per the code snippet below [ServiceContract] public

  • 0

I have a WCF Rest service as per the code snippet below

[ServiceContract]
public interface IService
{
     [OperationContract]
        [WebInvoke(UriTemplate="/SaveList/Foos/",Method="POST")]
        bool SaveList(List<Foo> myFoos);

}

The service is a self hosted service and exposes a an endpoint with webHttpBinding. I have a client console application which has the following code snippet:

public void Send()
{
   var myObj = new Foo{Id=1, Name="Test"};
   using (WebChannelFactory<OurService.Services.IOurService> cf = new WebChannelFactory<IOurService>("WebHttpBinding_IService"))
   {
       IUtranetService channel = cf.CreateChannel();
       using (new OperationContextScope(channel as IContextChannel))
       {
           var status = channel.SaveList(new[] { myObj });

        }

    }

} 

The client code throws an exception as follows:
There was no endpoint listening at “http://localhost:1133/Service/SaveList&#8221; that could accept the message.

I am not sure where I am going wrong. If I remove the UriTemplate from the service contract, the client returns back the right response.

Any help would be greatly appreciated.

Regards
Ruchitra

  • 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-09T12:08:29+00:00Added an answer on June 9, 2026 at 12:08 pm

    Your URI template is incorrect. You need to change it to this:

     [WebInvoke(UriTemplate="/SaveList/Foos/SaveList",Method="POST")] 
    

    It does not automatically append your method name.

    Also FYI as per the comment I left, you dont need Method=”Post”

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

Sidebar

Related Questions

I have a WCF-REST service with one method which returns a string: [ServiceContract] public
I have a WCF Rest service: [WebHelp(Comment = Sample description for GetData)] [WebInvoke(Method=POST, UriTemplate
I have a WCF WebApi Rest service that has the following endpoints: [WebGet(UriTemplate =
I have a very simple WCF REST Service [ServiceContract] [AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(InstanceContextMode
So I have wcf rest service which succesfuly runs from a console app, if
If I have a wcf rest service such as http://somedomain.com/service.svc/uniqueid/somemethod/parameter1 then is there a
We have a ASP.NET application running and i have added a WCF Rest service
I have an asp.net 4 application that hosts a WCF REST service via WebServiceHost...
I have ASP MVC 3 application. I created WCF REST JSON Service and added
I have a REST service consumed by a .Net WCF client. When an error

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.