0

I have a WCF service which was working good on .net4.0 But several days ago i upgraded the code to .net4.5 and compiled it . The Service is working fine and listening to specific port. But when i try to create a Proxy client i get an error (i was able to create a proxy client with "old" WCF service compiled on .net4.0) This is the app.config-

<service behaviorConfiguration="ExternalSystemsService.WExternalSystemsBehavior" name="ExternalSystemsService.WExternalSystems"> 
        <endpoint address="" binding="netTcpBinding" bindingConfiguration="ExternalSystemsTCP" name="ExternalSystemsServiceTcpBindingEndpoint" contract="ExternalSystemsService.IWExternalSystems"/>
        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="MexTcpBindingEndpoint" contract="IMetadataExchange"/>
        <host> 
          <baseAddresses> 
            <add baseAddress="net.tcp://fm6gmup4006:3220/ExternalSystemsService"/> 
          </baseAddresses> 
        </host> 
      </service>

and this is the error i receive (it is not related to the different end points , it is the same error if i use the endpoint as it is written in the app.config)-

C:\Program Files (x86)\Microsoft Visual Studio 11.0>svcutil.exe /language:cs /ou
t:JULeSService.cs /config:JULeSService.config net.tcp://havjules01:3020/External
SystemsService
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.18020]
Copyright (c) Microsoft Corporation.  All rights reserved.

Attempting to download metadata from 'net.tcp://havjules01:3020/ExternalSystemsS
ervice' using WS-Metadata Exchange. This URL does not support DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.18020]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot obtain Metadata from net.tcp://havjules01:3020/ExternalSystemsServ
ice

If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess.  For help enabling metadata publishing, please refer to the MSDN documentat
ion at http://go.microsoft.com/fwlink/?LinkId=65455.


WS-Metadata Exchange Error
    URI: net.tcp://havjules01:3020/ExternalSystemsService

    Metadata contains a reference that cannot be resolved: 'net.tcp://havjules01
:3020/ExternalSystemsService'.

    <?xml version="1.0" encoding="utf-16"?><Fault xmlns="http://www.w3.org/2003/
05/soap-envelope"><Code><Value>Sender</Value><Subcode><Value xmlns:a="http://www
.w3.org/2005/08/addressing">a:ActionNotSupported</Value></Subcode></Code><Reason
><Text xml:lang="en-US">The message with Action 'http://schemas.xmlsoap.org/ws/2
004/09/transfer/Get' cannot be processed at the receiver, due to a ContractFilte
r mismatch at the EndpointDispatcher. This may be because of either a contract m
ismatch (mismatched Actions between sender and receiver) or a binding/security m
ismatch between the sender and the receiver.  Check that sender and receiver hav
e the same contract and the same binding (including security requirements, e.g.
Message, Transport, None).</Text></Reason></Fault>

If you would like more help, type "svcutil /?"
Misha Groiser
  • 133
  • 11
  • Error message and configuration base address contain different urls and ports. Is this intended? – Alexander Jun 26 '14 at 19:23
  • it is not the issue. it is the same error if i use same endpoints. I just tested it on different endpoints . – Misha Groiser Jun 26 '14 at 19:25
  • Have you tried accessing your endpoint with WcfTestClient tool? Have you tried to specify net.tcp://havjules01:3020/External SystemsService/mex as url for svcutil? – Alexander Jun 26 '14 at 19:29
  • i tried accessing with WCFTestClient. The error i receive there is-Error: Cannot obtain Metadata from net.tcp://havjules01:3020/ExternalSystemsService – Misha Groiser Jun 26 '14 at 19:32
  • also using mex as url gives same error strange that i was able to create a proxy with WCF compiled to .net4 but not with .net4.5 . Although, i haven't changed anything in code – Misha Groiser Jun 26 '14 at 19:36
  • Have you tried: http://stackoverflow.com/questions/2690966/svcutil-exe-for-net-4-0 ? What is the path to svcutil? Also svcutil have /targetClientVersion option, which can specify target framework - it also may help. – Alexander Jun 26 '14 at 19:45
  • Tried using svcutil in VS2010 command prompt, receiving same error – Misha Groiser Jun 26 '14 at 19:50
  • was this issue resolved? Even i get the same. – superachu Jul 22 '14 at 14:42

0 Answers0