1

私のはWindowsアプリケーションです。ウェブサービスを利用しています。アプリケーションにサービス参照を追加すると、1 つの app.config ファイルが生成されます。

<client>
    <endpoint address="http://58.71.131.223/uucpapi/UUCPAPIServer.svc"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUUCPAPIServer"
        contract="UUCPAPI.IUUCPAPIServer" name="WSHttpBinding_IUUCPAPIServer">
        <identity>
            <dns value="localhost" />
        </identity>
    </endpoint>
</client>

そして、私はこのAPIを次のように呼び出しています

UUCPAPI.UUCPAPIServerClient uucp = new UUCPAPI.UUCPAPIServerClient();

ここでは例外をスローしています

ServiceModelクライアント構成セクションで、契約「UUCPAPI.IUUCPAPIServer」を参照するデフォルトのエンドポイント要素が見つかりませんでした。これは、アプリケーションの構成ファイルが見つからなかったか、このコントラクトに一致するエンドポイント要素がクライアント要素に見つからなかったためである可能性があります。」

4

1 に答える 1

-1
<client>
    <endpoint address="http://...../uucpapi/UUCPAPIServer.svc" 
              binding="wsHttpBinding" 
              binding configuration="WSHttpBinding_IUUCPAPIServer" 
              contract="UUCPAPI.IUUCPAPIServer" 
              name="WSHttpBinding_IUUCPAPIServer">
        <identity>
            <dns value="localhost" />
        </identity>
    </endpoint> 
</client>
于 2009-09-14T13:08:55.923 に答える