同比需要設置最大郵件大小和WCF webhttp緩衝區大小
<bindings>
<webHttpBinding>
<binding name="LargeWebBinding"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647">
<readerQuotas
maxArrayLength="2147483647"
maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647"
maxDepth="2147483647"
maxBytesPerRead="2147483647" />
</binding>
你可以嘗試使用這個:
<behaviors>
<serviceBehaviors>
<behavior name="LargeWebBehavior">
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="2147483647" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceTimeouts transactionTimeout="00:10:00" />
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="100"
maxConcurrentInstances="100" />
</behavior>
</serviceBehaviors>
</behaviors>
您確定它與PDF文件大小無關嗎?內容的限制(頁數)似乎很奇怪。 –
@Vojtech:ya我相信 –
聽起來你對大型PDF文件的處理有一個只在服務器環境中出現的錯誤。寫一堆日誌,看看你能否告訴服務在哪裏失敗。我會猜測它是內存,網絡,權限,或者你編寫的一些設置或代碼,它們只用於在本地機器上工作,但卻被推到了生產環境中。 – Patrick87