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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:30:19+00:00 2026-05-31T16:30:19+00:00

So trying to create a rest service but I keep getting an error: If

  • 0

So trying to create a rest service but I keep getting an error:

enter image description here

If I try to run it in a browser I get : The type 'WcfService2.Service1', provided as the Service attribute value in the ServiceHost directive could not be found.

namespace WcfService2
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public class HelloWorldService
    {
        [OperationContract]
        [WebGet(UriTemplate = "")]
        public string HelloWorld()
        {
            return "Hello world!";
        }
    }
}

namespace WcfService2
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.

    class Program
    {
        static void Main(string[] args)
        {
            WebHttpBinding binding = new WebHttpBinding();
            WebServiceHost host =
            new WebServiceHost(typeof(HelloWorldService));
            host.AddServiceEndpoint(typeof(HelloWorldService),
            binding,
            "http://localhost:8000/Hello");
            host.Open();
            Console.WriteLine("Hello world service");
            Console.WriteLine("Press <RETURN> to end service");
            Console.ReadLine();
        }
    }
}
  • 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-31T16:30:20+00:00Added an answer on May 31, 2026 at 4:30 pm

    You’re defining a REST-style WCF service using the WebHttpBinding.

    The WCF Test Client is only usable for SOAP services – not for REST services. REST services can be tested using your regular browser, or tools like Fiddler.

    The error message you’re getting would almost indicate that you have a *.svc lying around somewhere, too, that gets in your way. Is that the case?

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

Sidebar

Related Questions

I am trying to create something with extbase, but the error-message I get is
I am getting the following error message when trying to execute a GET REST
I'm trying to create a REST service in zend framework. I'm using zend server.
I've got a simple REST based service for which I am trying to create
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
Trying to create a user account in a test. But getting a Object reference
I'm trying to create a REST service which shows/adds/deletes/edits soccer data in a database.
I'm trying to create a REST service defined as: @POST @Path(/path) @Consumes(MediaType.APPLICATION_XML) @Produces(multipart/mixed) public
So I'm trying to create a C# WCF REST service that is called by
I am currently trying to create a REST web service for my django site

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.