Home » , » How to receive an huge data using WCF Service-How to send hug data. WCF Service Advane

How to receive an huge data using WCF Service-How to send hug data. WCF Service Advane

Written By M.L on புதன், 11 ஜனவரி, 2012 | ஜனவரி 11, 2012

We have created a WCF service and hosted in IIS. It was running fine and we could able to access through http.
This WCF service is consumed by third party (SAP HR), when they are trying to send huge data (50000 kibi) to our WCF service, its failing.
We are able to receive, if the data is 30000 kibi.

Does anyone have idea how to increase the size?
Please find the below details for Configuration settings. Please let us know if we are missing any settings either in config file


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    </sectionGroup>
  </configSections>
  <appSettings>
    <add key="LogSuccessfulTrace" value="Y" />

    <add key="SenderLogPath" value="C:\\inetpub\\wwwroot\\IPLSapHrWebService\\SAPHRLogs\\SenderLog" />
    <add key="ReceiverLogPath" value="C:\\inetpub\\wwwroot\\IPLSapHrWebService\\SAPHRLogs\\ReceiverLog" />
    <add key="SAPHRLogPath" value="C:\\inetpub\\wwwroot\\IPLSapHrWebService\\SAPHRLogs\\SAPHRReceivedFile" />
    <add key="ExceptionLogFile" value="C:\\inetpub\\wwwroot\\IPLSapHrWebService\\SAPHRLogs\\ExceptionLog.xml" />
   
   
    <add key="BookingTypesLookupType" value="BookingType" />
    <add key="AutomaticAllocationLookupValue" value="Automatic allocation" />
    <add key="LocationLookupType" value="Location" />
    <add key="GjoaLookupValue" value="Gjoa" />
    <add key="GDFTaskLocationFieldName" value="GDF_TaskLocation" />
    <add key="GDFOffshoreLocationValue" value="Off-shore" />
    <add key="MinimumGapForFlyingHomeConfigLabel" value="MinimumGapForFlyingHome" />
    <add key="DefaultMinimumGapForFlyingHome" value="48" />
    <add key="AvailabilityTypeLookupValue" value="AvailabilityType" />
    <add key="GDFResourceCustomFieldName" value="GDF_SAP_ID" />
    <add key="TimerUpdatePSI" value="10000" />

    <add key="PWAURL" value="http://GDFN-IPL-06/pwa" />
    <add key="LogSuccessfulTrace" value="Y" />
    <add key="PWADBConnectionString" value="Data Source=GDFN-SQL-06\H431128;Database=ProjectServer_Published;Integrated Security=SSPI" />
    <add key="NetworkUserName" value="IPL_Content_Dev" />
    <add key="NetworkPassword" value="D06Ubv85HO1seD" />
    <add key="NetworkDomain" value="gdfn" />
   
    <add key="ReceiverValidationScriptPath" value="" />
    <add key="SMTPHost" value="relay.gdfn.local" />
    <add key="MailFrom" value="noreply@gdfn.com" />
    <add key="UseDefaultCredentials" value="true" />
    <add key="ProvidedEncryptedValues" value="false" />
    <add key="DefaultValuePath" value="" />
  </appSettings>
  <connectionStrings>
 

    <add name="IPLDataLayer.Properties.Settings.ProjectServer_DraftConnectionString" connectionString="Data Source=GDFN-SQL-06\H431128;Initial Catalog=ProjectServer_Draft;Integrated Security=True" providerName="System.Data.SqlClient" />
    <add name="IPLDataLayer.Properties.Settings.ProjectServer_PublishedConnectionString" connectionString="Data Source=GDFN-SQL-06\H431128;Initial Catalog=ProjectServer_Published;Integrated Security=True" providerName="System.Data.SqlClient" />
    <add name="IPLDataLayer.Properties.Settings.GDF_IPL_DBConnectionString1" connectionString="Data Source=GDFN-SQL-06\H431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True" providerName="System.Data.SqlClient" />

  
  </connectionStrings>
  <system.web>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
    <authentication mode="Windows" />
    <identity impersonate="true" userName="gdfn\IPL_Content_Dev" password="D06Ubv85HO1seD" />
    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </controls>
    </pages>
    <httpHandlers>
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </httpModules>
  </system.web>
  <system.serviceModel>
   
    <client>
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IIPLUpdateTaskResourceNames"
        contract="UpdateTaskResourceNamesSvc.IIPLUpdateTaskResourceNames"
        name="BasicHttpBinding_IIPLUpdateTaskResourceNames" />
    </client>
    <bindings>
      <basicHttpBinding>
        <binding name="ExtAvailabilityBehavior" closeTimeout="00:59:00"
          openTimeout="00:59:00" receiveTimeout="00:59:00" sendTimeout="00:59:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                         maxBufferSize="2147483647" maxBufferPoolSize="524288000" maxReceivedMessageSize="2147483647"
                         messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <!--maxBufferSize="33554432" maxBufferPoolSize="33554432" maxReceivedMessageSize="33554432"-->
                  <!--2147483647-->
                  <readerQuotas maxDepth="33554432" maxStringContentLength="2147483647"
            maxArrayLength="33554432" maxBytesPerRead="33554432" maxNameTableCharCount="33554432" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="BasicHttpBinding_IIPLUpdateTaskResourceNames"
          closeTimeout="00:59:00" openTimeout="00:59:00" receiveTimeout="00:59:00"
          sendTimeout="00:59:00" allowCookies="false" bypassProxyOnLocal="false"
          hostNameComparisonMode="StrongWildcard" maxBufferSize="65536000" maxBufferPoolSize="524288000" maxReceivedMessageSize="65536000" messageEncoding="Text"
          textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="33554432" maxStringContentLength="33554432" maxArrayLength="33554432"
            maxBytesPerRead="33554432" maxNameTableCharCount="33554432" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="GDFSuez.SapHrWebService.ExternalAvailabilityDataReceiver" behaviorConfiguration="ExtAvailabilityBehavior">
        <endpoint contract="GDFSuez.SapHrWebService.IExternalAvailabilityDataReceiver" binding="basicHttpBinding" address="" bindingConfiguration="ExtAvailabilityBehavior" />
       
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ExtAvailabilityBehavior">
          <!-- 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="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="ScriptModule" />
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </modules>
    <directoryBrowse enabled="true" />
    <validation validateIntegratedModeConfiguration="false" />
    <handlers accessPolicy="Read, Execute, Script">
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  </system.webServer>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
        <providerOption name="CompilerVersion" value="v3.5" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
    </compilers>
  </system.codedom>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v2.0.50727">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.diagnostics>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <add name="dbTraceListener" type="GDFSuez.Framework.IPLDBTraceListeners.IPLDBTraceListener, GDFSuez.Framework.IPLDBTraceListeners"
          initializeData="Data Source=GDFN-SQL-06\H431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True" Source="SapHrServices"/>
      </listeners>
    </trace>
  </system.diagnostics>

  <system.serviceModel>
  </system.serviceModel>

</configuration>

Thanks in advance.

ANSWER 1:
 
Note : Provide your comments by clicking below options! Thanks ! :)

Please try  

1.buffer sizes of  all wcf services should be same size  at service side as well as at client side.

ANSWER 2:
Try the following things -

1 - Setting MessageEncoding to MTOM instead of Text
2 - Setting TransferMode to Streamed instead of Buffered

Also, please check the link - http://msdn.microsoft.com/en-us/library/ms733742.aspx

0 comments:

கருத்துரையிடுக

Popular Posts

General Category