1.服务端:
MaxRequestLength: 请求的最大大小(以千字节为单位)。默认大小为 4096 KB (4 MB)。
<
system.web
>
< httpRuntime maxRequestLength ="2147483647" />
< compilation debug ="true" targetFramework ="4.0" />
</ system.web >
< httpRuntime maxRequestLength ="2147483647" />
< compilation debug ="true" targetFramework ="4.0" />
</ system.web >
<
system.serviceModel
>
< bindings >
< basicHttpBinding >
< binding name ="NewBinding2MB" maxReceivedMessageSize ="2147483647"
maxBufferSize ="2147483647" maxBufferPoolSize ="2147483647"
closeTimeout ="10:00:00" openTimeout ="10:00:00" receiveTimeout ="10:00:00"
sendTimeout ="10:00:00" >
< readerQuotas maxArrayLength ="2147483647" maxStringContentLength ="2147483647"
maxBytesPerRead ="2147483647" maxDepth ="2147483647"
< bindings >
< basicHttpBinding >
< binding name ="NewBinding2MB" maxReceivedMessageSize ="2147483647"
maxBufferSize ="2147483647" maxBufferPoolSize ="2147483647"
closeTimeout ="10:00:00" openTimeout ="10:00:00" receiveTimeout ="10:00:00"
sendTimeout ="10:00:00" >
< readerQuotas maxArrayLength ="2147483647" maxStringContentLength ="2147483647"
maxBytesPerRead ="2147483647" maxDepth ="2147483647"
maxNameTableCharCount
="2147483647"
/>
</ binding >
</ basicHttpBinding >
</ bindings >
</ binding >
</ basicHttpBinding >
</ bindings >
2.客户端
<
binding
name
=" "
maxBufferSize
="2147483647"
maxReceivedMessageSize
="2147483647"
>
< security mode ="None" />
</ binding >
< security mode ="None" />
</ binding >