2012-07-04 3 views
0

IIS에서 WCF WF를 호스팅했습니다. 이 내 클라이언트의 app.config가IIS에서 호스팅되는 WCF 워크 플로

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <configSections> 
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 
     <section name="DataAccess.SharePoint.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
    </sectionGroup> 
    </configSections> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior> 
      <!-- 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 includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    </system.serviceModel> 
    <system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 
    <applicationSettings> 
    <DataAccess.SharePoint.Properties.Settings> 
     <setting name="DataAccess_SharePoint_Officecms_Lists" serializeAs="String"> 
     <value>http://site/_vti_bin/lists.asmx</value> 
     </setting> 
    </DataAccess.SharePoint.Properties.Settings> 
    </applicationSettings> 
</configuration> 

입니다 :

The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'GetData'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 197, position 41.

이 내 Web.config를한다 : 클라이언트 측에서 나는 이러한 오류를 IIS에 서비스에 액세스하려고하지만, 무엇입니까

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

내 구성을 확인하고 내가 뭘 잘못했는지 설명해 주시겠습니까?

답변

0

서버 또는 클라이언트에서이 메시지가 나타 납니까? 클라이언트에서 서버로 보내는 메시지가 기본 제한보다 큰 경우 web.config에서 메시지를 늘려야합니다.

<bindings> 
     <basicHttpBinding> 
     <binding> 
      <readerQuotas maxStringContentLength ="<your max here>"/> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
:

당신은는 system.serviceModel 섹션이를 추가하여 Web.config의에서 바인딩을 제어 할 수 있습니다

관련 문제