1

scvutil によって生成された次の app.config があります。私はWCFが初めてで、デバッグとエラーを試みていて、このファイルに includeExceptionDetailInFaults=true を追加したいのですが、どこにも行きません。誰かが正確に何を追加すればよいか教えてもらえますか? servicebehaviors を追加しようとしましたが、エラーが発生し続けます。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IService1" 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:8084/Service1.svc" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IService1" contract="IService1"
            name="BasicHttpBinding_IService1" />
    </client>
</system.serviceModel>

4

1 に答える 1

1

includeExceptionDetailInFaultsサーバープロパティ1であり、実際にはクライアントには適用されません。そのプロパティを設定する場合は、クライアント側(またはによって生成されるもの)ではなく、サーバー側を変更する必要がありますsvcutil


1このプロパティはクライアントでも設定できますが、クライアントがサービスとして機能しているデュプレックスコントラクトの場合のみです。を使用しているのでbasicHttpBinding、これは当てはまりません。

于 2012-09-28T16:09:56.880 に答える