WCF上传10M的文件报错
Client 配置如下:
contract="FileUitl.IFileUploadService" name="WSHttpBinding_IFileUploadService">
<identity>
<userPrincipalName value="" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="MTMOBinding" messageEncoding="Mtom" transactionFlow="True" useDefaultWebProxy="True" bypassProxyOnLocal="False" hostNameComparisonMode="StrongWildcard"
textEncoding="utf-8" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647">
<readerQuotas maxDepth="32" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="UploadWcfService.UpLoadServiceBehavior" name="FileUploadService">
<endpoint address="http://localhost:50268/FileUploadService.svc" binding="wsHttpBinding" bindingConfiguration="MTMOBinding"
contract="HQ.Server.Test.IFileUploadService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="UploadWcfService.UpLoadServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false"
multipleSiteBindingsEnabled="false" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>