2010-03-15 4 views
1

WCF WebService를 개발했습니다. 클라이언트 쪽에서는 8KB 이상의 파일 바이트를 보낼 수 없습니다 []. 클라이언트와 업로드 바이트 수를 늘리고 타임 아웃을 늘리는 방법은 무엇입니까?WCF WebService. 8KB 이상의 데이터 전송 허용 안 함

<system.serviceModel> 
    <!-- Test File Size --> 
    <binding maxReceivedMessageSize="2147483647"> 
    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" 
     maxArrayLength="2147483647" maxBytesPerRead="2147483647" 
     maxNameTableCharCount="2147483647" > 
    </binding> 

     <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> 
     <services> 
      <service name="WcfSmartConnect.Service1" behaviorConfiguration="WcfSmartConnect.Service1Behavior"> 
       <!-- Service Endpoints --> 
       <endpoint address="" binding="wsHttpBinding" contract="WcfSmartConnect.IService1"> 
        <!-- 
       Upon deployment, the following identity element should be removed or replaced to reflect the 
       identity under which the deployed service runs. If removed, WCF will infer an appropriate identity 
       automatically. 
      --> 
        <identity> 
         <dns value="localhost"/> 
        </identity> 
       </endpoint> 
       <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
      </service> 
     </services> 
     <behaviors> 
      <serviceBehaviors> 
       <behavior name="WcfSmartConnect.Service1Behavior"> 
        <!-- 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 httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/> 
       </behavior> 
      </serviceBehaviors> 
     </behaviors> 
    </system.serviceModel> 
+0

변경해야 할 param에 대한 특정 정보에 대한 예외를 확인하십시오. 또한 서비스 자체와 클라이언트 모두에서 변경해야합니다. – Kamarey

답변

1

어쩌면 당신는 system.serviceModel 태그가 아닌 직접 답변을 내부에 있지만 큰 파일이 완전한 바인딩 설정 태그를 추가보다 당신은 정말로 MTOM 또는 streaming을보고 있어야합니다.

1

endpiont 태그에 이것을 추가 :

bindingconfiguration="wsHttp" 

<binding name="wsHttp" maxReceivedMessageSize="2147483647"> 
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" 
     maxArrayLength="2147483647" maxBytesPerRead="2147483647" 
     maxNameTableCharCount="2147483647" > 
</binding> 
+1

알았어. 내가 오늘 누군가의 질문에 답하려고 할 때마다, 어떤 새로운 사람이 나를 때린다. :) +1 – wcm

+0

그것은 여전히이 오류를 던지고있다! System.Net.HttpWebRequest.GetResponse() 5,373,789 System.ServiceModel.Channels.HttpChannelRequest.WaitForReply (타임 아웃 시간 범위) +57 – Pinu

+0

I [WebException이은 (500) 내부 서버 오류. : 원격 서버에서 오류를 반환] 또한 내 webconfig를 추가했는지, 내가 더 이상 변경해야하는지 확인해 주시겠습니까 ??? – Pinu

관련 문제