Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 633021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:08:23+00:00 2026-05-13T20:08:23+00:00

What is the preferred way to retrieve large(approx: 50 MB) xml string from ASP.NET

  • 0

What is the preferred way to retrieve large(approx: 50 MB) xml string from ASP.NET webpage?

Placing the xml string in file and downloading the file is not a choice.(This should be my last resort if nothing else works)

I have following method on ASP.NET server which is exposed through WCF service to silverlight client.

[OperationContract]
public string GetXmlDataByRegion(string region)
{
   //Fetch Xml string from database based on given region name     
}

Unfortunately these xml strings are approximately 50MB to 100 MB. Silverlight client needs to retrive these large strings and store it in a file on the client machine at the path selected by the user through saveFileDialog.

My concern is WCF service will not allow such large messages. How can I address this issue? Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:08:23+00:00Added an answer on May 13, 2026 at 8:08 pm

    You can do it, you’ll just need to bump up the MaxReceivedMessageSize, maxBufferSize, maxBufferPoolSize, and potentially others – keep bumping them up until you’re successful.

    This will permit large files to be sent and received, but you need to open up both ends to expect it.

    You can also use a Binary message encoding (if you’re not already), even in Silverlight. This will result in smaller messages than plain text.

    For example:

            <binding name="ObjectServicePortBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:01:00" maxBufferSize="1048576" maxBufferPoolSize="5242880" maxReceivedMessageSize="52428800" 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>
    

    Edit:
    Streaming of data may be the more appropriate approach:

    • Streamed: Both in and out messages are streamed
    • StreamedRequest: Messages sent from client to server are streamed
    • StreamedRespone: Only messages returned from the server to the client are streamed
    • Buffered: This is the default of buffering all data and sending it in one burst

    http://msdn.microsoft.com/en-us/library/ms731913.aspx

    • Buffered transfers hold the entire message in a memory buffer until the transfer is complete. A buffered message must be completely delivered before a receiver can read it.

    • Streamed transfers expose the message as a stream. The receiver starts processing the message before it is completely delivered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.