Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

WCF Problem sa SVCUTIL kod klijenta

[es] :: .NET :: WCF Problem sa SVCUTIL kod klijenta

[ Pregleda: 1565 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

bags

Član broj: 10072
Poruke: 715
*.12.15.tuwien.teleweb.at.



+2 Profil

icon WCF Problem sa SVCUTIL kod klijenta29.04.2008. u 13:09 - pre 194 meseci
Evo vec dva dana zezam se sa ovim.

Trenutno implementiram klijent jedne WCF aplikacije i problem je sto sa svcutilom uvjek dobijam sledecu gresku:
Code:

WS-Metadata Exchange Error
    URI: net.tcp://localhost:8888/TestingService

    Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:
8888/TestingService'.

    <?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="de-AT">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>


App.config od servisa izgleda ovako:
Code:

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="DefaultBehavior">
          <serviceMetadata />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <netTcpBinding>
        <binding name="myNetTcpBinding" openTimeout="00:10:00" sendTimeout="00:10:00">
          <security mode="None" />
        </binding>
      </netTcpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="DefaultBehavior" name="Tvs2.Wcf.Service.TestingService">
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:8888/TestingService"/>
          </baseAddresses>
        </host>
        <endpoint address="net.tcp://localhost:8888/TestingService" binding="netTcpBinding"
          bindingConfiguration="myNetTcpBinding" contract="Tvs2.Wcf.Service.ITestingService"  />       
      </service>
    </services>    
  </system.serviceModel>
</configuration>


a od clienta:
Code:

<configuration>
    <system.serviceModel>
        <bindings>
            <netTcpBinding>
              <binding name="NewBinding0" openTimeout="00:10:00" sendTimeout="00:10:00" >
                <security mode="None"></security>
              </binding>
            </netTcpBinding>
          
        </bindings>
        <client>
            <endpoint address="net.tcp://localhost:8888/TestingService" binding="netTcpBinding"
                bindingConfiguration="NewBinding0" contract="Tvs2.Wcf.Service.ITestingService"
                name="">              
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>


Ovaj tag za security sam morao ubaciti jer inace se en moze spojiti na servis.
Free advice is seldom cheap.
 
Odgovor na temu

bags

Član broj: 10072
Poruke: 715
*.12.15.tuwien.teleweb.at.



+2 Profil

icon Re: WCF Problem sa SVCUTIL kod klijenta29.04.2008. u 13:49 - pre 194 meseci
Treba samo strpljivo citati uputstva:

Obavezno treba definisati mexHttpBinding endpoint:

<endpoint binding="mexHttpBinding" contract="IMetadataExchange" address="mex" />
Free advice is seldom cheap.
 
Odgovor na temu

[es] :: .NET :: WCF Problem sa SVCUTIL kod klijenta

[ Pregleda: 1565 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.