リモート サーバーのセットアップで WPF アプリを実行していますが、「リモート サーバーが予期しない応答を返しました: (400) 不正な要求」 が表示されます。
送信されるデータ サイズを小さくしようとしたところ、呼び出しが正常に機能したため、これは間違いなく要求サイズの問題です。私の構成からは、2 ギグが設定されているように見えますが、デフォルトの制限 (65000 バイトなど) のみが使用されているように動作します。私の設定に何か問題があると思います。
どんな助けでも大歓迎です!
マーク。
WCF web.config を使用してリモート サーバーをセットアップしました。
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBindingSettings" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="Csla.Server.Hosts.WcfPortal">
<endpoint contract="Csla.Server.Hosts.IWcfPortal" binding="wsHttpBinding"/>
</service>
</services>
そして、クライアント上の私の app.config は次のとおりです。
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBindingSettings" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint name="WcfDataPortal" address="http://alcatraz.dev/AlcatrazHost/WcfPortal.svc" binding="wsHttpBinding" contract="Csla.Server.Hosts.IWcfPortal" bindingConfiguration="wsHttpBindingSettings" />
</client>