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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:50:06+00:00 2026-06-07T22:50:06+00:00

I have manage to move my complexed WCF service into a Windows Service. The

  • 0

I have manage to move my complexed WCF service into a Windows Service. The binding looks like this :

<service behaviorConfiguration="MyAppClientService.CustomValidator_Behavior" name="MyApp.ServiceImplementation.MyAppClientService">
        <endpoint binding="netTcpBinding" bindingConfiguration="netTcpRegular" address="Regular" bindingNamespace="http://MyApp.ServiceContracts/2007/11" contract="MyApp.ServiceContracts.IMyAppClientService"/>
        <endpoint binding="netTcpBinding" bindingConfiguration="netTcpWindowMessageSecurity" address="Windows" bindingNamespace="http://MyApp.ServiceContracts/2007/11" contract="MyApp.ServiceContracts.IMyAppClientService"/>
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:8001/MyAppService/Client"/>
            <add baseAddress="http://localhost:8002/MyAppService/Client"/>
          </baseAddresses>
        </host>
      </service>

When the service is started I browse : http://localhost:8002/MyAppService/Client This works fine and I can also see the WSDL.

But when I try to connect to the service with my Winform client It cant find the service, this is how the address looks like in the client :

<client>
<endpoint address="net.tcp://localhost:8001/MyAppService/Client/MyAppClientService.svc/Regular" behaviorConfiguration="BasicBehavior" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IMyAppClientServiceRegular" contract="MyApp.ServiceContracts.IMyAppClientService" name="MyTest_RegularLogin"/>
</client>

When browsing http://localhost:8001/MyAppService/Client I will get a missing page, I suppose that this is right because it is hosted on tcp and not http?

When the service was hosted in the IIS7(WAS) this was working just fine but then I used a endpoint at the client that looked like this :

<endpoint address="net.tcp://localhost/MyAppDev/MyAppClientService.svc/Regular" behaviorConfiguration="BasicBehavior" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IMyAppClientServiceRegular" contract="MyApp.ServiceContracts.IMyAppClientService" name="MyApp_RegularLogin"/>

Note : Regular stats that this is a regular login where the client provides username and password(no Windows login)

Edit :

I have followed this article : http://msdn.microsoft.com/en-us/library/ms733069.aspx

And this is how windows service class looks like

public class MyAppWindowsService : ServiceBase
    {
        public ServiceHost _serviceHost = null;
        public MyAppWindowsService()
        {
            // Name the Windows Service
            ServiceName = "MyAppWindowsService";
        }

        public static void Main()
        {
            ServiceBase.Run(new MyAppWindowsService());
        }

        // Start the Windows service.
        protected override void OnStart(string[] args)
        {
            if (_serviceHost != null)
            {
                _serviceHost.Close();
            }

            // Create a ServiceHost for the CalculatorService type and 
            // provide the base address.
            _serviceHost = new ServiceHost(typeof(MyApp.ServiceImplementation.MyAppClientService));

            // Open the ServiceHostBase to create listeners and start 
            // listening for messages.
            _serviceHost.Open();
        }

        protected override void OnStop()
        {
            if (_serviceHost != null)
            {
                _serviceHost.Close();
                _serviceHost = null;
            }
        }

    }
  • 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-07T22:50:08+00:00Added an answer on June 7, 2026 at 10:50 pm

    The problem was that I tried to connect to localhost/MyAppDev/MyAppClientService.svc/Regular but it whould be localhost/MyAppDev/Regular

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

Sidebar

Related Questions

I have Normal Windows Form (WinForm) C# (.Net 3.5) application, this application has label
My knowledge of regex is very weak. So far I have manage to create
Do I programmatically have to manage the backcolor\highlight color on a Listview's item when
i have a couple questions about an idea i have to manage a form
I'm looking at a simple class I have to manage critical sections and locks,
%windir%\Microsoft.NET\assembly\ is the new GAC . Does it mean now we have to manage
i need to connect to another server we manage and have it's results (in
I have a Singleton to manage some variables I need in various places in
I have a app to manage book orders from some people, here is the
I have been wondering about how people manage their strings if they are likely

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.