WCF를 통해 대용량 파일을 업로드하려면이 문서 http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP을 읽었습니다.WCF 스트리밍 대용량 파일
동일한 구성을 만들었지 만 파일을 업로드 할 때도 012kb을 추가하더라도 48kb를 업로드했습니다. 48KB가 넘는 파일을 업로드하려고하면 오류가 발생합니다.
The remote server returned an error: (413) Request Entity Too Large.
내가 잘못되었거나 누락 되었습니까?
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime executionTimeout="4800" maxRequestLength="2097150"/>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<!--BINDING-->
<bindings>
<basicHttpBinding>
<binding name="TransferService"
closeTimeout="00:10:00"
maxBufferPoolSize="2147483647"
maxBufferSize="2147483647"
maxReceivedMessageSize ="2147483647"
openTimeout="00:10:00"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
messageEncoding="Text"
transferMode="Streamed"
>
<readerQuotas
maxDepth="2147483647"
maxStringContentLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647"
maxArrayLength="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
<!--SERVICE-->
<services>
<service name="TransferService.TransferService"
behaviorConfiguration="TransferServiceBehavior" >
<endpoint
address=""
binding="basicHttpBinding"
bindingConfiguration="TransferService"
contract="TransferService.ITransferService" >
</endpoint>
</service>
</services>
<!--BEHAVIOR-->
<behaviors>
<serviceBehaviors>
<behavior name="TransferServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="500000000"></requestLimits>
</requestFiltering>
</security>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
웹 클라이언트 설정 :
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ITransferService" />
</basicHttpBinding>
</bindings>
<client>
<endpoint name="BasicHttpBinding_ITransferService"
address="http://localhost/transfer/TransferService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ITransferService"
contract="TransferService.ITransferService" />
</client>
</system.serviceModel>
어떤 솔루션을 제안하십시오 아래 내 설정
서버 설정입니다. 당신의 제안으로
사전
에서덕분에 지금은 설정을 변경했지만 여전히 400 또는 413 아래는 내 테스트 프로젝트 같은 오류가 발생합니다. 왜 그런지 모르겠어? (환경 : 윈도우 7 프로 64 비트, IIS7, WCF 4.0)
나는 연구와 이주 보낸거야하지만이 같은 오류의https://skydrive.live.com/redir?resid=BFE92959302FBAA0!105&authkey=!ANO_URChpql9gKE
.
도와주세요. 미리 감사드립니다.
NetTCp처럼 다른 프로토콜을 사용해야합니다 ... 파일 보내기에 basicHTTP를 사용하지 마십시오. –