我局域网用wcf上传文件,具体是用的流,然后我在本地iis部署wcf之后,可以上传 50M左右的文件,可我吧wcf部署到另外一台机器上之后,小文件上传没问题,可是 50M左右的文件就是上传不上去呢?求解!!!
客户端报的错误:
具体的配置:
服务端:
<binding name="UploadServiceBinding" maxReceivedMessageSize="2147483647" sendTimeout="00:10:00" receiveTimeout ="00:10:00" transferMode="Streamed" openTimeout ="00:10:00">
<readerQuotas maxStringContentLength="2147483647" maxArrayLength ="2147483647" />
</binding>
<service behaviorConfiguration="UploadFileServiceBehavior" name="NWEPDI.EPDS.FileServices.ServiceImplementation.UploadFileService">
<endpoint address="http://192.168.0.110:89/UploadFileService.svc" binding="basicHttpBinding"
bindingConfiguration="UploadServiceBinding" contract="NWEPDI.EPDS.FileServices.ServiceContracts.IUploadFileService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
客户端:
<binding name="BasicHttpBinding_IUploadFileService1" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="655360000" maxBufferPoolSize="524288000" maxReceivedMessageSize="655360000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="4096000" maxNameTableCharCount="16384000" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
、
<endpoint address="http://192.168.0.110:89/UploadFileService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IUploadFileService1"
contract="ServiceReference2.IUploadFileService" name="BasicHttpBinding_IUploadFileService1" />
以前也碰到过这个问题,好像是文件太大了,后来改成siverlight上传文件控件了