Collection already contains an address with scheme http RRS feed

  • Question


    My environment:

    Windows 2003 server that acts as a domain controller

    WCF service hosted in IIS


    Unable to connect to the wcf service from another machine on the same network (not joined to the domain).

    Was getting following error when adding Service Reference in VS 2008 or using the svcutil.exe:


    The document at the url was not recognized as a known document type.

    The error message from each known type may help you fix the problem:

    - Report from 'DISCO Document' is 'There was an error downloading ''.'.

    - The remote name could not be resolved: ''

    - Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

    - Report from '' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

    - Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

    Metadata contains a reference that cannot be resolved: ''.

    Content Type application/soap+xml; charset=utf-8 was not supported by service The client and service bindings may be mismatched.

    The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..

    If the service is defined in the current solution, try building the solution and adding the service reference again.

    Ok, did some research on the problem. I went to Default Website props in IIS and added another identity for the website as follows: ip address = default, TCP port = 80, host header address =

    Browsed to the webservice directory and received following page:

    You have created a service.

    To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:



    Went back to VS2008 to add the Service Ref again and received the following error:

    This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
    Parameter name: item

    Ok, did more research and applied the baseAddressPrefixFilters attribute in the web.config of the service with a prefix of, but I still cannot get it work, it keeps throwing the above error.

    What gives...I'm at the end of my rope with this. I'm tring to convert an existing WSE 3.0 service to a WCF service.

    Sample webconfig file for the test WCF service I'm using (it's one of the "Geting Started" project provided on MSND"):

    <?xml version="1.0" encoding="utf-8" ?>





    <add prefix =""/>







    <!-- this endpoint is exposed at the base address provided by host: http://localhost/servicemodelsamples/service.svc -->

    <!-- specify BasicHttp binding and a binding configuration to use -->

    <endpoint address=""



    contract="Microsoft.ServiceModel.Samples.ICalculator" />





    Following is the expanded configuration section for a BasicHttpBinding.

    Each property is configured with the default value.

    See the TransportSecurity, and MessageSecurity samples in the

    Basic directory to learn how to configure these features.



    <binding name="Binding1"















    <security mode="None" />




    <!--For debugging purposes set the includeExceptionDetailInFaults attribute to true-->



    <behavior name="CalculatorServiceBehavior">

    <serviceMetadata httpGetEnabled="True"/>

    <serviceDebug includeExceptionDetailInFaults="True" />






    Monday, August 4, 2008 8:01 PM

All replies