2012-07-27 2 views
0

Techies - 나는 "인기있는 메시지 크기 (65536)를 초과했습니다."할당량을 늘리려면 MaxReceivedMessageSize 속성을 사용하십시오. 적절한 바인딩 ". 여기에 새로운 것은 없습니다 - 나는 그 메시지가 말하는 것을 할 필요가 있습니다. 제 문제는 서비스 web.config 파일에서 어디에 설정해야할지 불확실합니다.wcf 선언적 wf 서비스 : web.config 설정

이것은 선언적 워크 플로우 서비스로 작업 한 첫 번째 사례입니다. 생성 된 web.config 파일이 다른 유형의 wcf 서비스에 대해 생성 된 것보다 약간 가벼운 것으로 보입니다. 여기에서 기본은 바로 상자 밖으로이다 :

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
<system.web> 
<compilation debug="true" targetFramework="4.0" /> 
</system.web> 
<system.serviceModel> 
<behaviors> 
    <serviceBehaviors> 
    <behavior> 
     <serviceMetadata httpGetEnabled="true"/> 
     <serviceDebug includeExceptionDetailInFaults="false"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
</system.serviceModel> 
<system.webServer> 
<modules runAllManagedModulesForAllRequests="true"/> 
</system.webServer> 
</configuration> 

나는이에 대한 프록시 클래스를 생성하는 svcutil.exe에를 실행하면, 여기서 생성있어 무엇 :

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
<system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
      <binding name="BasicHttpBinding_TelaPointSMService" closeTimeout="00:01:00" 
       openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
       allowCookies="false" bypassProxyOnLocal="false" 
       hostNameComparisonMode="StrongWildcard" 
       maxBufferSize="65536" maxBufferPoolSize="524288" 
       maxReceivedMessageSize="65536" 
       messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
       useDefaultWebProxy="true"> 
       <readerQuotas maxDepth="32" maxStringContentLength="8192" 
       maxArrayLength="16384" 
       maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
       <security mode="None"> 
        <transport clientCredentialType="None" proxyCredentialType="None" 
         realm="" /> 
        <message clientCredentialType="UserName" algorithmSuite="Default" /> 
       </security> 
      </binding> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://localhost:18781/TelaPointSMService.xamlx" 
      binding="basicHttpBinding" 
      bindingConfiguration="BasicHttpBinding_TelaPointSMService" 
      contract="TelaPointSMService" name="BasicHttpBinding_TelaPointSMService" /> 
    </client> 
    </system.serviceModel> 
    </configuration> 

을 따라서 워크 플로 서비스의 웹에서. config 파일에서,이 서비스가 기본 설정보다 큰 메시지를 처리 ​​할 수 ​​있음을 어떻게 선언 할 것인가? 설정이 클라이언트 바인딩에서도 변경되어야한다는 것을 알고 있습니다.하지만 그 변경을 어디서해야하는지 명확합니다.

답변

1

4.0을 사용하는 것처럼 보입니다. 따라서 구성 파일은 기본 엔드 포인트와 바인딩으로 인해 더 가벼워집니다. 앞서 보았 듯이 기본 바인딩에 기본 설정이 있다는 점에서 문제가 있습니다.

이 문제를 해결하려면 해당 바인딩이있는 모든 서비스에 사용할 서비스의 구성 파일에 명시 적으로 기본 바인딩을 정의 할 수 있습니다. 당신은 평소와 같이 바인딩을 정의합니다이 작업을 수행하지만이 같은 거라고, 그래서 당신은 name 속성을 생략하려면

<system.serviceModel>  
    <bindings>   
    <basicHttpBinding>    
     <binding maxReceivedMessageSize="5242880" /> 
    </basicHttpBinding> 
    </bindings> 
    <!-- The rest of your services config file --> 
</system.serviceModel> 

당신은 (아마도, 버퍼 크기) 다른 값도 증가해야 할 수 있습니다를 그래서 당신은 추가 그들과 같은 방식으로 그들 maxReceivedMessageSize. 5242880 값은 과거에 사용한 적이 있지만 더 큰 값이 필요할 수도 있습니다 (또는 더 작은 값이 유용 할 수도 있음).

+0

Tim, 저에게이 질문에 답해 주셔서 너무 감사드립니다. 나는 정말로 그것을 바르게 평가한다! – plditallo

관련 문제