.NET Developers

.NET Developers

262,407 members
  • Join

    When you join a group, other members will be able to see your profile and message you. The group logo will be visible on your profile unless you change that setting.

  • Information and settings

Have something to say? Join LinkedIn for free to participate in the conversation. When you join, you can comment and post your own discussions.

Arun J.

Arun

How to make a wcf client work if its configuration resides in another config file?

Experienced .NET professional, application architect, and visionary

I have defined the wcf service model in another config file other than the primary assembly's config file. I also have learned that you can use ConfigurationManager.OpenExeConfiguration() to open the secondary config file.

But if your service models are defined in the secondary one, how will your wcf client work, because by default it looks in the configuration of the executing assembly. I need to make this look into the secondary config file.

This is a question I have posted on stackoverflow. Please feel free to answer anywhere.

This post is an offshoot of my previous post. However I have not tried implementing what was mentioned there yet. I've just learned the use of ConfigurationManager.OpenExeConfiguration() to load configurations. Next question...

  • Flag as Inappropriate
  • Comment (1)
  • May 25, 2012
  • Close viewer

Comments

  • Michel P.

    Michel

    Michel P.

    Senior Software developer .Net and legacy Desktop , Distributed , Web and Smart Device Development (Phone ,Tablet)

    Top Contributor

    All WCF configuration can be done programatically.
    So it's possible to create both servers and clients without a config file or to just create custom settings and read them, there is nothing keeping you from supplying the settings in any manner you choose database, xml, text etc etc

    or you might opt for configsource as described here
    http://weblogs.asp.net/cibrax/archive/2007/07/24/configsource-attribute-on-system-servicemodel-section.aspx

Feedback