1

ビジュアル2010サービス参照ウィザードを使用してWebサービスへの参照を作成した直後に、app.configの出力を見ると、これがbasicHttpBindingapp.configのノードで取得したものです。

        <basicHttpBinding>
            <binding name="FirmNameServiceSOAPServiceSoapBinding" 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="Transport">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
            </binding>
            <binding name="FirmNameServiceSOAPServiceSoapBinding1" 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>

ノードbinding name="FirmNameServiceSOAPServiceSoapBinding"binding name="FirmNameServiceSOAPServiceSoapBinding1"は完全に複製されています。

その理由について何か考えがありますか?それは何かに役立ちますか?

4

2 に答える 2

0

<Binding>2番目のノードにコメントしただけです。その後も、ビルドと実行は正しく行われます。

これはMSVisual2010のバグであり、アプリの構成ファイルを汚染していると思います。何が起こっているのかを理解しようとするとき、それは役に立ちません。

于 2013-03-05T14:33:09.333 に答える
0

私の推測では、あなたのサービスは複数のBasicHttpBindings. サービス構成を確認します。

次のようなパスにある WcfTestClient で何が起こるかを確認できます。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe
于 2013-03-05T14:44:23.290 に答える