You must Sign In to post a response.
  • Category: Webservices

    Error in sending large encoded data as input to webservice

    Hi,
    I have large content in text file and i have encoded the text file content(huge data). I need to send that data as input to my webservice method..i need the solution fot solving this error:
    enceded text: NjIzIDAwMDAwIG4NCjAwMDAwMTEyNzIgMDAwMDAgbg0KMDAwMDAxMTg2NSAwMDAwMCBuDQowMDAwMDEyNDkxIDAwMDAwIG4NCjAwMDAwMTMxOTIgMDAwMDAgbg0KMDAwMDAxMzg2OCAwMDAwMCBuDQowMDAwMDE0NDIyIDAwMDAwIG4NCjAwMDAwMTQ1MTMgMDAwMDAgbg0KMDAwMDA4MzU2OSAwMDAwMCBuDQowMDAwMTQ0MTk2IDAwMDAwIG4NCjAwMDAxOTgwODIgMDAwMDAgbg0KMDAwMDE5ODM2OCAwMDAwMCBuDQowMDAwMTk4......

    Webservice already written:
    public clas WebService:Service
    {
    [webGet]
    public string ProcessFile(string Filecontent)
    {
    ......
    }
    }

    How to Solve this...
  • #755402
    In the webservice app.config file there are settings which decides the maximum size of the input string for a web service.

    Please add the following to the App.config, which allows a maximum string input size of 32Mb. This should allow you to send large data to your web service.
    <system.web>
    <httpRuntime maxRequestLength="32768" />
    </system.web>

    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #755483
    The option is to increase the Request buffer for web service so that you can send a large data using WCF service.

    here is the way to increase the buffer size.



    <bindings>
    <webHttpBinding>
    <binding name="LargeWeb"
    maxBufferPoolSize="1500000"
    maxReceivedMessageSize="1500000"
    maxBufferSize="1500000">
    <readerQuotas
    maxArrayLength="656000"
    maxBytesPerRead="656000"
    maxDepth="32"
    maxNameTableCharCount="656000"
    maxStringContentLength="656000"
    />
    </binding>
    </webHttpBinding>
    </bindings>

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #755491
    Hi,

    better u have use WCF instaedof Webservices, as compared to webservice, in wcf u can send huge data..

    do changes inn webconfig file like as:

    <bindings>
    <basicHttpBinding>
    <binding name="BasicHttpBinding_WCFService"
    maxBufferSize="2147483647"
    maxReceivedMessageSize="2147483647">
    <security mode="None" />
    </binding>
    </basicHttpBinding>
    </bindings>




    Thanks,
    Chitaranjan

  • #755508
    Hi,
    Can anyone share the example of C# source code for writing webservice and calling that service for sending this type of data?


  • Sign In to post your comments