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

The Archive Base Latest Questions

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

My service can work with normal WCF calls, but to expose metadata (the wsdl

  • 0

My service can work with normal WCF calls, but to expose metadata (the wsdl file) I have to change configuration in such a way the normal WCF host fails.

I’ve spend countless hours on google trying to solve this, big problem there is that hosting a service inside a website is never discussed (yes this is different).

requirements:

  • Runs in an existing web site
  • Use sessions
  • Operable with Java, and as much .net versions as possible.
  • Expose metadata (wsdl will be enough)

edits:

  • IIS cannot be used
  • I’m using .NET 4 and WCF 4.

In this configuration the metadata can be reached (through the wsdl file) but when trying to host the normal wcf endpoints I get and InvalidOperationException:

Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [].

So the base address is ignored.

But when I supply full addresses to the endpoints (simply copy the base address in front of the current address) the normal WCF calls work fine, but when trying to access metadata I get the following error:
No protocol binding matches the given address ‘http://localhost:8080/Functionality‘.

Protocol bindings are configured at the Site level in IIS or WAS configuration.

Here is the web.config serviceModel section, I made a small test web site just for testing this, but it would be to much to post all of it here, if you send me a pm though I will e-mail it to you.

 <system.serviceModel>
  <services>
   <service behaviorConfiguration="metadataSupport" name="MyStuff.TestWithMetadata">
    <endpoint address="Functionality" binding="wsHttpBinding" name="FunctionalityBinding"
     contract="MyStuff.ITestWithMetadata" />
    <host>
     <baseAddresses>
      <add baseAddress="http://localhost:8080/" />
     </baseAddresses>
    </host>
   </service>
  </services>
  <behaviors>
   <endpointBehaviors>
    <behavior name="metadataSupport">
     <webHttp />
    </behavior>
   </endpointBehaviors>
   <serviceBehaviors>
    <behavior name="metadataSupport">
     <!--Navigate with browser to httpGetUrl for the wsdl file-->
     <serviceMetadata httpGetEnabled="true" httpGetUrl="Metadata" />
     <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
   </serviceBehaviors>
  </behaviors>
  <serviceHostingEnvironment multipleSiteBindingsEnabled="false">
   <serviceActivations>
    <add relativeAddress="TestWithMetadata.svc" service="MyStuff.TestWithMetadata" />
   </serviceActivations>
  </serviceHostingEnvironment>
 </system.serviceModel>

If anyone has any ideas on how to solve this, please help out.

  • 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-15T18:19:10+00:00Added an answer on May 15, 2026 at 6:19 pm

    When you host your service in IIS (which I assume from your requirement “Runs in an existing web site”), then your base address in the config is moot – it will not be used at all.

    When hosting in IIS, your service address is determined by:

    • your server name
    • possibly a port number
    • the virtual directory (and possibly subdirectories thereof) where the *.svc file lives
    • the *.svc file itself (including extension)

    So it might be something like:

    http://MyServer:7777/ExistingWebApp/TestWithMetadata.svc
    

    or whatever it is that you have in your case.

    You seem to be using .NET 4 and WCF 4 (never mentioned that…..) and in that case, you could skip the *.svc file altogether by adapting your config entry:

    <serviceHostingEnvironment multipleSiteBindingsEnabled="false">
        <serviceActivations>
            <add relativeAddress="MyService" service="MyStuff.TestWithMetadata" />
        </serviceActivations>
    </serviceHostingEnvironment>
    

    In this case, the value of relativeAddress= becomes the service address (within the virtual directory this web.config lives in) – so your service address would be something like:

    http://MyServer:7777/ExistingWebApp/MyService
    

    No need for a *.svc file at all in this situation.

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

Sidebar

Related Questions

How can I configure my WCF service to work as a normal TCP server?
I have a WCF service that can return large amount of data depending on
I have normal WCF service with few methods. I would like to log some
I just can't get the ajax service to work. A simple class to $.get(http://google.com)
I am developing a WCF service which can be consumed by mobile applications to
I have a restful web service which can deal with DTOs in json format
We have a WCF service that uses Microsoft.Practices.EnterpriseLibrary.Validation and receives an object like so
Here at work we're working with an OData WCF Service to create our new
I know I can reset the Java timer, but, since I already have so
I am try to use Sandcastle Help File Builder, but can't quite get it

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.