为什么常识

用WCF做大文件上传,应该搭配什么样的传输协议和配置?

生活词典 changshi.cidiancn.com

阅读: 214

用WCF做大文件上传,应该搭配什么样的传输协议和配置?试试看知乎上问具体技术问题有没有高手回答,或是给点具体建议。1 个答案

答案 1:

上传 NetTcp协议, 通过二进制流上传 System.IO.File.WriteAllBytes();配置改大点。< bindings > < netTcpBinding > < binding name="netTcpBindConfig"closeTimeout="00:01:00"openTimeout="00:01:00"receiveTimeout="00:10:00"sendTimeout="00:01:00"transactionFlow="false"transferMode="Buffered"transactionProtocol="OleTransactions"-ostNameComparisonMode="StrongWildcard"listenBacklog="10"-xBufferPoolSize="2147483-7 "-xBufferSize="2147483-7 "-xConnections="10"-xReceivedMessageSize="2147483-7 " > < readerQuotas -xDept-="32"-xStringContentLengt-="2147483-7 "-xArrayLengt-="2147483-7 "-xBytesPerRead="4096"-xNameTableC-arCount="16384" / > < reliableSession ordered="true"inactivityTimeout="00:10:00"enabled="false" / > < security mode="Transport" > < transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" / > < /security > < /binding > < /netTcpBinding > < /bindings >资料应该挺多的。不过知乎WCF的问题的确很少啊。

分享常识给亲友.

下一篇:驼背和颈椎有直接联系么? 下一篇 【方向键 ( → )下一篇】

上一篇:著名的威尼斯叹息桥有何传说? 上一篇 【方向键 ( ← )上一篇】