I am trying to generate a client proxy from a WCF service library. I am using VS2005, .NET 3.0 on a Windows XP Pro workstation. The WCF service is hosted in a windows service. When I run the windows service as a console application, there are no problems. I can run svcutil.exe against that address and it generates the proxy. However, when I compile that service in release mode, and install it on the workstation using InstallUtil, I get an error "Error: Cannot obtain Metadata from net.tcp://localhost:9090/Service2 ". These are the settings I am using the app.config for the service
<system.serviceModel>
<services>
<service behaviorConfiguration="serviceBehaviour" name="WCFServiceLibrary3.service2">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:9090/Service_2" />
</baseAddresses>
</host>
<endpoint binding="mexTcpBinding" name="TCP_Mex" contract="IMetadataExchange" />
<endpoint address="mex" binding="customBinding" bindingConfiguration="TestBinding2" name="TestBinding2" contract="WCFServiceLibrary3.IService2" behaviorConfiguration="Test2" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="Test2">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="serviceBehaviour">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata />
<!--<serviceMetadata httpGetEnabled="true" />-->
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="TestBinding2" inactivityTimeout = "00:30:00" openTimeout="00:30:00"
receiveTimeout="00:30:00"
sendTimeout="00:30:00">
<binaryMessageEncoding />
<tcpTransport transferMode="StreamedResponse" />
</binding>
</customBinding>
</bindings>
</system.serviceModel>