2009-08-07 95 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等

相關問題