我正在远程服务器设置中运行WPF应用程序,但得到“远程服务器返回意外响应:(400)错误请求”。使用WPF CSLA远程服务器时出现错误
这绝对是一个请求大小的问题,因为我试图减少发送的数据大小和通话正常工作。从我的配置看来,我有2 Gigs设置,但它的行为只有默认的限制(如65000字节)正在使用。我想我的配置有问题。
任何帮助,将不胜感激!
Mark。
我有一个远程服务器建立使用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>