2011-06-14 66 views
0

我使用ASIFormDataRequest將圖像以JSON格式發佈到基於「WCF REST服務模板40(CS)」的WCF REST服務。對於小於WCF服務的默認消息大小@ 65536字節的圖像,它工作正常,但我想增加該值。使用JSON增加消息大小的WCF webhttp服務

我看到已經添加了一個的WebHttpBinding具有較高maxReceivedMessageSize等所有的例子,與使用bindingConfiguration一個服務端點在一起。但是,使用此模板,我沒有可以指向端點標記的.svc或界面。

編輯:

<standardEndpoint name="" helpEnabled="true" maxBufferPoolSize="1500000" maxReceivedMessageSize="1500000" transferMode="Streamed" automaticFormatSelectionEnabled="true"/> 

回答

0

我有同樣的問題:對不起,我使用standardEndpoint標籤才得以修復。我已經完成了我能找到的每個消息大小設置,而且我仍然遇到同樣的問題。我懷疑我的服務甚至因爲某些原因沒有使用這些設置。當然可以使用一些幫助。謝謝!這是我的「standardEndpoint」:

<standardEndpoints> 
    <webHttpEndpoint> 
    <standardEndpoint name="WebHTTP" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferPoolSize="0" helpEnabled="true" automaticFormatSelectionEnabled="true" faultExceptionEnabled="true"> 
     <readerQuotas maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxDepth ="2147483647" /> 
    </standardEndpoint> 
    </webHttpEndpoint> 
</standardEndpoints> 
+0

您是否使用「WCF REST服務模板40(CS)」模板? – c05psl 2011-06-27 06:13:53

+0

BrainMan,我用「WCF REST服務模板40(CS)」模板開始解決了與您共享的配置相同的問題。 – 2011-09-17 23:25:21