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

  • SEARCH
  • Home
  • 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 6666459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:49:51+00:00 2026-05-26T02:49:51+00:00

I’ve inherited an ASP.NET (.net 3.5) web app and the corresponding C# client components

  • 0

I’ve inherited an ASP.NET (.net 3.5) web app and the corresponding C# client components and a related javascript client.

The server-side components use the default [WebMethod] serialization and, given the size of some of our XML documents (and the verbosity of the element names), I’m curious about options to shrink the size of the documents returned.

I’m open to binary XML, custom serialization of XML (e.g., change ThisVeryLongElementNameWhichShowsUpALot into something shorter), simple compression, moving to JSON, etc. We do have quite a substantial number of individual WebMethods and different objects returned, so the ideal solution would involve changing as little as possible on both sides of the equation.

I understand there will be a CPU/bandwidth tradeoff doing things like compression or custom serialization, so I’d like to benchmark some options without building a giant pile of code.

Could someone please point me at relevant documentation or IIS/VS.NET options to configure to explore these tradeoffs?

  • 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-26T02:49:51+00:00Added an answer on May 26, 2026 at 2:49 am

    I recently tested IIS compression and was happy with the results, after I figured out how to set the compression level. The end result was a 196 kb JSON result compressed to 13.6 kb.

    Below are some notes I made for myself on setting up dynamic compression and setting the compression level. I apologize if they are rough as I made them primarily for my own future reference.

    In addition, I would definitely advise trying JSON over XML as it provides a much more compact result. I don’t have specific numbers, but off-hand, my recollection is that JSON was around 50% smaller than XMl.


    Install dynamic compression if necessary

    Windows 7:

    1. Open the Programs and Features console by going to Start > Control Panel > Programs and Features.
    2. Click ‘turn Windows features on or off’.
    3. In the dialog, expand Internet Information Services > World Wide Web Services > Performance Features, and turn on Dynamic Content Compression.
    4. Click Ok.

    Windows Server 2008:

    1. Open the Server Manager console by going to Start > All Programs > Administrative Tools > Server Manager.
    2. In the Server Manager tree view, expand Roles, and click Web Server (IIS).
    3. In the main window, scroll down to the Role Services panel, and click Add Role Services.
    4. In the Select Role Services dialog, click and enable Web Server (Installed) > Performance (Installed) > Dynamic Content Compression.
    5. Click Next.
    6. On the Confirm Installation Selections screen, click Install.

    Enable dynamic compression in IIS

    1. In IIS management app, select the server, and in the IIS feature group, double click “Compression”.
    2. Check “Enable dynamic content compression”.

    Enable for “application/json” and “application/xml”

    1. Find the applicationHost.config file in c:\Windows\System32\inetserv\config
    2. edit it and find the httpCompression element.
    3. Under <dynamicTypes>, add the following elements:
    <add mimeType="application/json" enabled="true" />
    <add mimeType="application/xml" enabled="true" />
    

    Restart IIS.

    To verify, check in Fiddler and make sure the ‘Decode’ button is not selected (the Decode button should be on the main toolbar). You should see that the response ‘Content-Encoding’ header shows ‘gzip’, and that the response is compressed:

    enter image description here

    Advanced Settings

    Set the compression level using the following command (the default level is 0):

    C:\Windows\System32\Inetsrv\Appcmd.exe 
        set config -section:httpCompression
        -[name='gzip'].staticCompressionLevel:9
        -[name='gzip'].dynamicCompressionLevel:4
    

    See these sites for additional details:

    Making the most out of IIS compression – Part 1: IIS 7 configuration

    IIS 7 Compression. Good? Bad? How much?

    My initial testing of a json response:

    None:          196,416 bytes
    Level 0:        35,234
    Level 1:        29,219
    Level 4:        18,461
    Level 9:        13,638
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am writing an app with both english and french support. The app requests

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.