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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:45:27+00:00 2026-05-26T10:45:27+00:00

I have a project that is a WCF client using netTCP endpoints. The project

  • 0

I have a project that is a WCF client using netTCP endpoints. The project compiles into a DLL that is referenced by another project. I use AppSettings to switch between local and remote ip endpoints like so:

    public EmbeddedClient()
    {
        //Grab ip to use: remote or local (used for simulator)
        String location = ConfigurationSettings.AppSettings["ipAddress"];
        String ip = ConfigurationSettings.AppSettings[location];

        //Default to localhost if no appsetting was found
        if (ip == null)
            ip = "localhost";

        String address = String.Format("net.tcp://{0}:9292/EmbeddedService", ip);

        //Setup the channel to the service...
        channelFactory = new ChannelFactory<IEmbeddedService>(binding, new EndpointAddress(address));

    }

My App.Config is where I have my AppSettings and WCF endpoints:

  <?xml version="1.0" encoding="utf-8" ?>
  <configuration>
  <appSettings>
    <add key="ipAddress" value="local"/>
    <!-- Replace above value to "local" (Simulator) or "remote" (Harware)-->
    <add key="local" value="localhost"/>
    <add key="remote" value="192.168.100.42"/>
  </appSettings>

  <system.serviceModel>
      <!--WCF Endpoints go here--->
  </system.serviceModel>
  </configuration>

When I compile the project the appsetting always returns a null. I also noticed that app.config is renamed to something like Embedded_DCC_Client.dll.config after compiling. Why is it not able to find my appsettings? Why is it returning null? Thanks.

  • 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-26T10:45:28+00:00Added an answer on May 26, 2026 at 10:45 am

    It sounds like you’re trying to use a config file with the DLL – that won’t work. You need to set your app settings and WCF-specific settings in the app file of the application that references the WCF DLL. Th DLL will use the config file of the calling application.

    In other words:

    MyWCF.dll – this is your WCF DLL.

    MyApplication.exe – this is an application that references WCF.DLL.

    You would put your app settings and system.serviceModel settings in the app.config file of MyApplication.exe. MyWCF.DLL should then read the values from that config.

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

Sidebar

Related Questions

here's the setup for the project. I have a WCF Service that is hosted
I'm using WCF RIA Services and I have a domain service method that returns
I have this method, that will be called against from a WCF Client, but
I have a project using WCF which was working fine, but I moved the
I am working on a project that is using NetTcp bindings for talking to
I have put together a HTTP driven API using the WCF WebAPI that uses
I have a WCF Web application that uses a WCF Class Library. My project
I have a .NET 4.0 project with two modules that will communicate via WCF
I am developing an application using WPF/MVVM. I have a WCF data service project
I have a project in which I use WCF Data Services to expose access

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.