0

WCF サービスのエンド ポイントに問題があります。サービスを作成し、Windows フォーム プロジェクトでテストしました。これはうまくいきました。この問題は、Silverlight から動作させようとすると発生します。問題の原因となっているステートメントは

Dim l_svcOOA As SvcZipStreamClient = New SvcZipStreamClient("BasicHttpBinding_IServiceZipStream")

エラーは言う

ServiceModel クライアント構成セクションで、名前が 'BasicHttpBinding_IServiceZipStream' でコントラクトが 'svcZipStream.ISvcZipStream' のエンドポイント要素が見つかりませんでした。これは、アプリケーションの構成ファイルが見つからなかったか、この名前に一致するエンドポイント要素が client 要素に見つからなかったためである可能性があります。System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName) の System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName) の System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address) のスタック トレース System.ServiceModel .ChannelFactory 1.CreateSimplexFactory 1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress) at System.ServiceModel.EndpointTrait() で System.ServiceModel.EndpointTrait 1.CreateChannelFactory() at System.ServiceModel.ClientBase1.1 endpointTrait) at System.ServiceModel.ClientBase1.System.ServiceModel.ClientBase`1..ctor(String endpointConfigurationName) での InitializeChannelFactoryRef() Common.svcZipStream.SvcZipStreamClient..ctor(String endpointConfigurationName) で Common.clsUtilities.GetFileInZip(String p_ZipFile, String p_FileName)

ServiceReferences.ClientConfig は次のとおりです。

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_ISvcZipStream" maxBufferSize="2147483647"
                maxReceivedMessageSize="2147483647">
                <security mode="None" />
            </binding>
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://localhost:22214/ServiceZipStream.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISvcZipStream"
            contract="svcZipStream.ISvcZipStream" name="BasicHttpBinding_ISvcZipStream" />
    </client>
</system.serviceModel>

いつものように、助けていただければ幸いです。

4

1 に答える 1

0

問題が解決したことをお知らせしたかっただけです。サービスへの呼び出しは Silverlight クラス ライブラリからのものだったので、エンドポイントで定義された Silverlight アプリケーションも必要でした。下記のブログに答えがありました。

http://chanmingman.wordpress.com/2011/04/04/could-not-find-endpoint-element-with-name-basichttpbinding_iservice-and-contract-servicereference1-iservice-in-the-servicemodel-client-configuration- section-this-might-be-because-no-configura/

于 2013-05-01T20:01:28.710 に答える