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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:28:15+00:00 2026-05-19T12:28:15+00:00

I have a WCF rest webservice. It is working fine. I am wanting to

  • 0

I have a WCF rest webservice. It is working fine. I am wanting to understand the different configuration values available within the endpoint element.

In particular, I’m trying to understand the purpose of the address element. Changing the value doesn’t seem to change how I can address the service. For this, I’m running the service from visual studio 2010 and cassini. the port number is set to 888.

with address set to an empty string i get…
http://localhost:888/restDataService.svc/hello will return “hello world”.

with address set to “localhost” i get…
http://localhost:888/restDataService.svc/hello will return “hello world”.

with address set to “pox” i get…
http://localhost:888/restDataService.svc/hello will return “hello world”.

It doesn’t matter what value I set into the address field. It doesn’t impact the url. My only explanation that I have is that the value is more for non-REST services.

<system.serviceModel>
  <services>
    <service behaviorConfiguration="MobileService2.DataServiceBehaviour" name="MobileService2.DataService">

      <endpoint address="pox" binding="webHttpBinding" contract="MobileService2.IRestDataService" behaviorConfiguration="webHttp">
      </endpoint>

      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"  />
    </service>
  </services>
  <behaviors>
    <endpointBehaviors>
      <behavior name="webHttp">
        <webHttp />
      </behavior>
    </endpointBehaviors>
    <serviceBehaviors>
      <behavior name="MobileService2.DataServiceBehaviour" >
        <serviceMetadata httpGetEnabled="true" />
        <serviceDebug includeExceptionDetailInFaults="true" />
      </behavior>
    </serviceBehaviors>
  </behaviors>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>

I also have the following service contract

    [ServiceContract]
    public interface IRestDataService
    {
        [OperationContract]
        [WebGet(UriTemplate = "hello")]
        string Hello();
    }

And in the .svc

<%@ ServiceHost Language="C#" Debug="true" 
            Service="MobileService2.RestDataService" 
            Factory="System.ServiceModel.Activation.WebServiceHostFactory"
            CodeBehind="RestDataService.svc.cs" %>

And the ‘code-behind’

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class RestDataService : IRestDataService
{
    public string Hello()
    {
        return "hello";
    }
}
  • 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-19T12:28:15+00:00Added an answer on May 19, 2026 at 12:28 pm

    Can you also show service element of your configuration? I think that your configuration is not used or you are accessing other instance of the application (did you configure Cassini to use port 80?) because your second and third test should return HTTP 404 Resource not found.

    Correct addresses for your tests are:

    1. http://localhost/restDataService.svc/hello
    2. http://localhost/restDataService.svc/localhost/hello
    3. http://localhost/restDataService.svc/pox/hello

    Check that your name in service element is exactly the same as name of service type (including namespaces) as used in ServiceHost directive in .svc markup.

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

Sidebar

Related Questions

I have a WCF 4 REST WebService within a folder in my ASP.Net MVC
I am using WCF and REST, and I have complex types, which are working
I have a simple WCF4 REST service which is working fine when using a
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
I have written a WCF REST API for third-party use. One of the things
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 some REST web services implemented in WCF. I wish to make these

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.