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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:12:48+00:00 2026-06-11T02:12:48+00:00

I am currently learning WCF and I have a very weird problem. I have

  • 0

I am currently learning WCF and I have a very weird problem.

I have created a WCF service and hosted in a console application. I created a client and when I start debugging the client everything works as expected. The browser hits the address specified in the service.
But, when I just run the client without debugging I get an exception.
The entire time I have not touched the service. Only the client. The service is hosted in a console application.

I also noticed something very weird.
I put a console.readline() in client. Now while debugging client, when I attach the debugger, I see a WCF service desktop notification that tells me service is hosted and I am able to use the service and it works. I can also access the address via browser. If i detach the debugger, address does not work in browser. If I re- attach then it works again, another desktp notification appears. This tells me my Service is up and running when I debug only. When I exit the debugger, the service exits. But I am not touching the service, the entire time just the client.

Pleaseeee tell me I am not crazy 🙁

MyAddress:

http://localhost:8732/Design_Time_Addresses/MASService/Service1/

Exception:
There was no endpoint listening at [MyAddress] that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

This is my service configuration:

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

  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <services>
      <service name="MASService.MasOperationsService" behaviorConfiguration="SimpleServiceBehavior">
        <endpoint address="" binding="wsHttpBinding" contract="MASService.IMasOperations">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8732/Design_Time_Addresses/MASService/Service1/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SimpleServiceBehavior">
          <!-- To avoid disclosing metadata information, 
           set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

This is my service host configuration (console app):

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <services>
            <service name="MASService.MasOperationsService">
                <endpoint address="http://localhost:8733/Design_Time_Addresses/MASService/Service1"
                    binding="basicHttpBinding" bindingConfiguration="" contract="MASService.IMasOperations" />
            </service>
        </services>
    </system.serviceModel>
</configuration>

This is my client configuration (console app):

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_IMasOperations" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:8732/Design_Time_Addresses/MASService/Service1/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMasOperations"
                contract="ServiceReference1.IMasOperations" name="WSHttpBinding_IMasOperations">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>
  • 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-11T02:12:50+00:00Added an answer on June 11, 2026 at 2:12 am

    The client will need the port to which the console app is exposing the service. I imagine when running the debugger vs is hosting on the port your client is successfully connecting to. (Would have added this as a comment, but my nexus client does not appear to support comments) try 8733 and the bindings should match.

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

Sidebar

Related Questions

I'm currently learning wcf for an up and coming project. The service I am
im currently learning python (in the very begining), so I still have some doubts
Currently learning Scheme/Racket and have problem running this piece of code. (if (or (<
im currently learning jQuery and have ran into a problem. I am trying to
I am learning and designing a WCF service. I have picked to use Windows
im currently learning stacks in java and have a quick question. what will the
Hi I am currently learning how to use service and notifications in android and
I'm currently in the beginning of learning WCF, as some of the concepts and
I have a learning application that implements the most important endpoints in a sole
Hi I'm currently learning Ruby On Rails and I have a little mistake. I

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.