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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:33:49+00:00 2026-05-13T17:33:49+00:00

i am trying to host a service in IIS which has 2 methods… 1

  • 0

i am trying to host a service in IIS which has 2 methods… 1 of them can also be accesed via a simple HTTP-GET request…

This is my config:

  <service name="Svc.PaymentService" behaviorConfiguration="DefaultBehavior">
    <endpoint address="PaymentService.svc/"
              bindingName="Http"
              binding="basicHttpBinding"
              bindingConfiguration="httpBinding"
              contract="Svc.IPaymentService" />
    <endpoint address="WEBGETPaymentService.svc/"
              behaviorConfiguration="EndpointWebGetBehavior"
              binding="webHttpBinding" 
              contract="Svc.IPaymentService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost/MyService/" />
      </baseAddresses>
    </host>
  </service>

the content auf the SVC files is just a simple redirect to my classes

<%@ ServiceHost Service="Svc.PaymentService"  %>
<%@ Assembly Name="MyService" %>

and the interface looks like this:

    [OperationContract]
    string SOAPMethod(
        string test);

    [OperationContract]
    [WebGet(UriTemplate = "asdf?test={test}")]
    string RESTfulMethod(
        string test);

When i am trying to host the service in IIS and call it via HTTP-GET Request, i always receive a 404…

http://localhost/MyService/WEBGETPaymentService.svc/RESTfulMethod/asdf?test=hello

Anyway, when i try to call the SOAP method via PaymentService.svc it works…

Any ideas what the mistake is?

Thanks

  • 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-13T17:33:50+00:00Added an answer on May 13, 2026 at 5:33 pm

    Well, in order to use the webHttpBinding, you need to use the WebServiceHost (see MSDN docs) in your REST based *.svc file.

    So your WEBGETPaymentService.svc should look like this:

    <%@ ServiceHost Language="C#" Debug="True" 
        Service="Svc.PaymentService"
        Factory="System.ServiceModel.Activation.WebServiceHostFactory"  %>
    

    so in that case, it will then use the WebServiceHost and do all the necessary magic to make REST possible in WCF.

    Also check out the WCF REST developer center on MSDN for more info on how to host and use WCF REST services.

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

Sidebar

Related Questions

I'm trying to host a WCF service in IIS so that I can access
I have a simple test purpose WCF service. I'm trying to host it under
I'm trying to self-host a WCF web service and provide a HTTP endpoint with
I'm trying to host a WCF service with net.tcp binding within an IIS 7.5
I am trying to host a WCF web service in IIS using Windows Authentication.
I am trying to host a WCF Service with Net TCP bindings in IIS
I'm trying to host my service with IIS 6 but I keep get this
I am trying to host a WCF service written in .NET 3.5 in IIS
I'm trying to host my WCF service in a windows service host. For managing
I have a WCF service. I am trying to host the service in a

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.