WCF Standard-Endpunkt nicht gefunden

Ich bin erstellen einer WCF-Dienst. Es ist meine erste. Ich erhalte die Fehlermeldung:

Nicht finden konnte standardendpunkt
element verweist Vertrag
'WCFClient.IWCFClient' in der
ServiceModel-client-Konfiguration
Abschnitt.

Ich habe versucht, schalten um endpoint-Namen und solche, und löschen/Neuerstellen der service-Referenz. Ich kann nicht scheinen, um herauszufinden, was das problem ist.

Application-Config:

<bindings>
    <basicHttpBinding>
         <binding name="BasicHttpBinding_IWCFClient" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
            </binding>
    </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://localhost:4295/Services/WCFClient.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWCFClient"
            contract="WCFClient.IWCFClient" name="BasicHttpBinding_IWCFClient" />
    </client>

Service-Config:

 <services>
  <service behaviorConfiguration="WCFGraphicManagementTool.Services.WCFClientBehavior"
    name="WCFGraphicManagementTool.Services.WCFClient">
      <endpoint address="" name="BasicHttpBinding_IWCFClient" binding="basicHttpBinding" contract="WCFGraphicManagementTool.Contracts.IWCFClient">
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="WCFGraphicManagementTool.Services.WCFClientBehavior">
        <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        <serviceThrottling maxConcurrentCalls="120" maxConcurrentSessions="120" maxConcurrentInstances="120" />
        <serviceMetadata httpGetEnabled="True" />
        <serviceDebug includeExceptionDetailInFaults="True" />
    </behavior>
  </serviceBehaviors>
</behaviors>    
Wie erstellen Sie die client-proxy?
Ist es das, was du meinst:
WCFClient.WCFClientClient WCFClient = new WCFClient.WCFClientClient(); Dies ist die Linie, dass es Fehler auf.
Es ist der einzige Endpunkt, definiert in der client-config? Was passiert, wenn Sie anrufen: var client = new WCFClient.WCFClientClient("BasicHttpBinding_IWCFClient");
Das ist der einzige Endpunkt, der in meiner config. Ich habe versucht, die oben genannte Zeile und es kam zurück mit dem gleichen Fehler grundsätzlich: nicht finden Konnte, endpoint-element mit dem Namen 'BasicHttpBinding_IWCFClient' und Vertrag 'WCFClient.IWCFClient " im ServiceModel-clientkonfigurationsabschnitt

InformationsquelleAutor Matt Schubert | 2011-04-29

Schreibe einen Kommentar