merging output.config / app.config

Nov 9, 2009 at 5:43 PM


I have found WSCF.classic very valuable and I thought I'd try my hand at a WCF web service using

I was following along using the schema, message, and wsdl examples in the recent MSDN article:  (BTW, I think there is a slight namespace problem with the examples given there. The message schema and the WSDL use the same target namespace, yet you are importing Messages.xsd into ProcessExplorerService.wsdl. I think you either need to handle via xs:include or change ProcessExploreService.wsdl so it has a different target namespace than Messages.xsd).

Where I'm getting stuck is in figuring out what to do with output.config. The article mentions that: "The release of discussed in this article does not yet support merging configuration files. Consequently, the required configuration to host your service is emitted to an output.config file. A manual step is required to move the content of this file to your web.config or app.config file as appropriate."

I've tried to do this merge, but must be screwing something up. I'm familiar with using the WCF configuration editor and I'm capable of editing directly as well. I've copied my output.config below. I also followed the advice in this this post and I registered Thinktecture.ServiceModel.Extensions.Metadata.dll in the gac. I still can't seem to get a working configuration. I wonder if someone might be able to help with an example of a "merged" config file or advice on what is necessary in accomplishing the merge. When I debug, I'm getting messages such as "The client is unable to retrieve service metadata."

Many thanks in advance. 

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="">
                <behavior name="metadataServiceExtension">
                    <metadataService metadataUrl="wsdl" rootMetadataFileLocation="C:\Documents and Settings\callen\My Documents\Visual Studio 2008\Projects\ContractFirst\ContractFirst\ProcessExplorerService.wsdl" />
                <binding name="processExplorerHttpBinding">
                    <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
                        messageVersion="Soap12" writeEncoding="utf-8">
                        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <add name="metadataService" type="Thinktecture.ServiceModel.Extensions.Metadata.StaticMetadataBehaviorElement, Thinktecture.ServiceModel.Extensions.Metadata, Version=, Culture=neutral, PublicKeyToken=20fb7cabbfb92df4" />
            <service behaviorConfiguration="metadataServiceExtension" name="processExplorer.cs.processExplorer">
                <endpoint address="http://localhost/processexplorer" behaviorConfiguration=""
                    binding="customBinding" bindingConfiguration="processExplorerHttpBinding"
                    contract="IprocessExplorer" />

Nov 11, 2009 at 12:39 AM
Edited Nov 11, 2009 at 12:40 AM

I did figure out something that seems to work.  Here's the result in case it might be useful to anyone else looking for a simple example:


Nov 11, 2009 at 10:27 AM


You're right. There should be some info on how to do it.  I will take a look at your sample and go over some earlier POCs and see if we can publish something on how this can be done easily. We are also considering a feature to allow users to merge config at the end , perhaps with some GUI support to choose config information.




Nov 30, 2009 at 8:30 PM

Are there any hints or pointers as to how to merge the output.config with the app.config?