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 3437452
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:04:01+00:00 2026-05-18T08:04:01+00:00

Recently I’ve been working on a WCF app and needs some functionalities to compress

  • 0

Recently I’ve been working on a WCF app and needs some functionalities to compress the soap message body, so that the size of response from service should be reduced.

After some research, I found an implementation available online from http://weblogs.asp.net/cibrax/archive/2006/03/29/WS_2D00_Compression-for-WCF.aspx’>http://weblogs.asp.net/cibrax/archive/2006/03/29/WS_2D00_Compression-for-WCF.aspx, the authors of it created a new binding element ‘CompressionBindingElement’, associated with its channels related classes.

This compression solution works perfectly in my WCF app, and the size of response was reduced almost 90%, great! I firstly tested it over http binding (means custom binding using http transport) and everything seems good.

Once I tried it via net.tcp binding (custom binding using tcp transport), the app still worked well. However, when I checked it by some tracing tools, I found something weird.

I did a unit test by calling 10 times on a method, which created the client by ChannelFactory, and explicitly added all binding elements, including the compression binding element. When I firstly checked the response in TcpTrace, I was surprised to see that all these 10 messages are combined in a single request.

So I tried SvcTraceViewer to check the request, and found that the socket connection keeps open until the service was shut down. I looked inside the processing progress and believed all messages, channels are closed for each request, but the connection just not closed.

The issue only happened in net tcp binding with a compression binding element, if the element was not added to binding or in http binding everything seems fine.

Has anyone tried that solution and seen the same issue before? Is there anything else I can do to force the connection to close? Could I’ve missed anything?

Many thanks,
Tony

  • 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-18T08:04:02+00:00Added an answer on May 18, 2026 at 8:04 am

    It looks like Microsoft now has an official article on Compression Encoder:
    http://msdn.microsoft.com/en-us/library/ms751458(v=VS.90).aspx

    I tested it over and looks like the problem is gone. It’s not that easy to make my unit test run after that many days 🙂

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

Sidebar

Related Questions

Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my
Recently, I started changing some of our applications to support MS SQL Server as
Recently, I've been dealing with an error with accessing MAPI via the .NET framework
Recently our site has been deluged with the resurgence of the Asprox botnet SQL
Recently Jeff has posted regarding his trouble with database deadlocks related to reading. Multiversion
Recently I had to develop a SharePoint workflow, and I found the experience quite
Recently we got a new server at the office purely for testing purposes. It
Recently, I read an article entitled SATA vs. SCSI reliability . It mostly discusses
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
Recently a friend and I were talking about securing stored procedure code in a

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.