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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:25:42+00:00 2026-06-06T17:25:42+00:00

I know this is a FAQ, and I’ve read all similar Q’s and A’s

  • 0

I know this is a FAQ, and I’ve read all similar Q’s and A’s but I’m still not coming right.

I’m a newbie at web services and ASP.NET in general. I have a small WCF service application written by a colleague which worked and was demo’ed on his pc. On my pc, and with no changes, I can’t get it to be accepted by the WCF Test Client program when adding it as a service (error message below). My colleague is now on leave!

The project properties are set to start WcfTestClient.exe using the VS development server with an auto-assigned port number. The project has a webform.aspx and a Global.asax file added which are needed for the service.

I have run

netsh http add urlacl url=http://localhost:51568/Service1.svc user=<loginname>

My questions are how do I get the service started by WcfTestClient, and the webform on the browser?

I have looked at various SO answers to similar questions but am still stumped.

Failed to add a service. Service metadata may not be accessible. Make
sure your service is running and exposing metadata. Error: Cannot
obtain Metadata from http://localhost:51568/Service1.svc If this is a
Windows (R) Communication Foundation service to which you have access,
please check that you have enabled metadata publishing at the
specified address. For help enabling metadata publishing, please
refer to … Error URI: http://localhost:51568/Service1.svc
Metadata contains a reference that cannot be resolved:
‘http://localhost:51568/Service1.svc‘. There was no endpoint
listening at http://localhost:51568/Service1.svc that could accept the
message. This is often caused by an incorrect address or SOAP action.
See InnerException, if present, for more details. Unable to connect
to the remote server No connection could be made because the target
machine actively refused it 127.0.0.1:51568HTTP GET Error URI:
http://localhost:51568/Service1.svc There was an error downloading
‘http://localhost:51568/Service1.svc‘. Unable to connect to the
remote server No connection could be made because the target
machine actively refused it 127.0.0.1:51568

This is my web.config:

<system.web>
    <compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
    <services>
        <service name="Service1" behaviorConfiguration="DefaultBehavior">
            <endpoint address="http://localhost:*/Service1" binding="basicHttpBinding" contract="IService1" />
            <endpoint address="http://localhost:*/Service1/mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="DefaultBehavior">
                <serviceMetadata httpGetEnabled="true"/>
                <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

Something strange to me regarding port numbers is that if I don’t set the project to start with the external program then the browser lists the directory listing at localhost port 50345 which is a different port number to 51568.

  • 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-06-06T17:25:44+00:00Added an answer on June 6, 2026 at 5:25 pm

    Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:51568

    And

    if I don’t set the project to start with the external program then the browser lists the directory listing at localhost port 50345

    This simply means your WCF service is hosted at the latter port. You can change this on the ‘Web’ tab in your project’s properties.

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

Sidebar

Related Questions

I know this is game design related, but I have read the StackOverflow FAQ
So, I know this is probably a FAQ, but I can't seem to unravel
Yes, I know that the FAQ pretends to answer this, but it doesn't really.
Know this might be rather basic, but I been trying to figure out how
i know this is a stupid question but i d'ont know how to do
I know this is possible in Perl, but I was wondering if this can
I know this is an old question, but I have spend any hours on
I know destructor shouldn't not throw exception. http://www.parashift.com/c++-faq-lite/dtors.html#faq-11.13 I have the following code :
I know this is kind of easy question but i cant seem to find
Sorry if this is not the type of question to be asked here but

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.