2009-08-07 28 views
0

我正在远程服务器设置中运行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> 

回答

1

必须设置客户端和服务器上的配额,不只是一个。

0

也许连接超时? 2GB是要通过Web服务提交的大量数据。

你可能想看看替代手段,以在网络中移动的数据,如文件共享,SFTP等

相关问题