클라이언트
주의할점은
서버와 클라이언트 방식을 똑같이 맞추어 줘야한다
일단 기본적으로 20MB 이상 안올라감
아래값은 최대값이다(2GB) 이렇게 하면 성능 저하 및 디도스 공격에 취약해짐. 적절하게 값을 지정 해야하고
인증받은 계정만 쓸 수 있게 해야함
transferMode="Streamed" messageEncoding="Mtom"
private static IFileService CreateIFileService() { BasicHttpBindingService<IFileService> service = new BasicHttpBindingService<IFileService>(Framework.Module.WCFCommon.FileServiceURL); service.BasicHttpBindingProperty.MessageEncoding = WSMessageEncoding.Mtom; service.BasicHttpBindingProperty.TransferMode = TransferMode.Streamed; service.BasicHttpBindingProperty.MaxBufferPoolSize = 2147483647; service.BasicHttpBindingProperty.MaxBufferSize = 2147483647; service.BasicHttpBindingProperty.MaxReceivedMessageSize = 2147483647; service.BasicHttpBindingProperty.ReaderQuotas.MaxDepth = 2147483647; service.BasicHttpBindingProperty.ReaderQuotas.MaxArrayLength = 2147483647; service.BasicHttpBindingProperty.ReaderQuotas.MaxBytesPerRead = 2147483647; service.BasicHttpBindingProperty.ReaderQuotas.MaxStringContentLength = 2147483647; service.BasicHttpBindingProperty.ReaderQuotas.MaxNameTableCharCount = 2147483647; return service.CreateProxy(); }
서버 web.config
<bindings>
<basicHttpBinding>
<binding name="baseBasicHttpBinding" closeTimeout="00:10:00"
openTimeout="00:50:00" receiveTimeout="01:50:00" sendTimeout="00:50:00"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
transferMode="Streamed" messageEncoding="Mtom">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="KAI.CIM.WebService.FileService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="baseBasicHttpBinding"
contract="KAI.CIM.Framework.Contract.IFileService" />
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
</service>
</services>
http://msdn.microsoft.com/ko-kr/library/aa395209(v=vs.110).aspx
* MTOM은 SOAP 메시지와 함께 큰 이진 첨부 파일을 원시 바이트로 전송함으로써 더 작은 크기의 메시지를 허용하는 메커니즘입니다.
'C#.NET 웹서비스' 카테고리의 다른 글
| [웹서비스 및 웹사이트 디버깅 , system.diagnostics] (0) | 2012.03.12 |
|---|---|
| [SetEntitySetPageSize] WCF DataService 페이징 (0) | 2011.03.05 |
| [ AspNetCompatibilityRequirements ] 서비스가 ASP.NET 호환성을 지원하지 않으므로 서비스를 활성화할 수 없습니다. (0) | 2011.02.23 |
| [DataService UploadFileCompleted Result ] 비동기 업로드 xml 결과값 받기 (0) | 2011.01.26 |
| WCF DataService IIS 실행 (세팅) 안될때 확인 해볼 사항 (0) | 2011.01.25 |
| WCF Data Services 퀵 스타트 // IIS Data Services 세팅 (0) | 2011.01.25 |
| [MSDN]How to: Add, Modify, and Delete Entities (WCF Data Services) (0) | 2010.10.25 |
| MSDN [WCF Data Services/DataSvcUtil.exe ]수동으로 클라이언트 데이터 서비스 클래스 생성 (0) | 2010.10.20 |
| 메시지를 역직렬화하는 동안 포맷터에서 예외가 발생했습니다. (0) | 2010.07.22 |
| [ServiceThrottlingBehavior] 서비스 성능을 조정할 수 있는 런타임 처리량 설정을 구성 (0) | 2010.05.20 |