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

The Archive Base Latest Questions

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

I have an asp.net .asmx webservice written to handle requests from a third party

  • 0

I have an asp.net .asmx webservice written to handle requests from a third party tool. The third party tool makes an http POST request to the webservice to get user information. I’m using IIS7

Running Fiddler with “Remove All Encodings” checked, I can see the webservice call and and everything functions properly. If I uncheck “Remove All Encodings”, the webservice call fails with a 400 Bad Request. The difference I see is that the header “Content-Encoding: gzip” is being removed by Fiddler and the content is being decompressed.

So, when the Content-Encoding header is removed and the content is decompressed, my webservice functions perfectly. When the header is present and the content is compressed, the webservice fails.

How can I either:

  1. Configure my webservice to tell the client that it won’t accept compressed requests (and hope that the third party tool respects that)
  2. Decompress the content early in the asp.net handling
  3. Modify my webservice to work with compressed data

Update: To be clear, I don’t need to configure gzip encoding in the Response, I need to deal with a Request TO my webservice that is gzip encoded.

Update 2: The third-party tool is the Salesforce.com Outlook plugin. So, I don’t have access to modify it and it is used by many other companies without trouble. It’s got to be something I’m doing (or not doing)

Update 3: I found one post here that says that IIS does not support incoming POST requests with compressed data, it only supports compressed Responses. Can this still be true?

  • 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-18T20:10:13+00:00Added an answer on May 18, 2026 at 8:10 pm

    I’ve found a partial answer here.

    class DecompressStream : Stream
    {
        ...
    
        public override int Read(byte[] buffer, int offset, int count)
        {
            GZipStream test = new GZipStream(_sink, CompressionMode.Decompress);
    
            int c = test.Read(buffer, offset, count);
    
            return c;
        }
    
        ...
    }
    

    I can then specify the filter on the request object like this:

    void Application_BeginRequest(object sender, EventArgs e)
        {
            string contentEncoding = Request.Headers["Content-Encoding"];
            Stream prevCompressedStream = Request.Filter;
    
            if(contentEncoding == null || contentEncoding.Length == 0)
                return;
    
            contentEncoding = contentEncoding.ToLower();
    
            if(contentEncoding.Contains("gzip"))
            {
                Request.Filter = new DecompressStream(Request.Filter);
            }
        }
    

    I say partial answer because even though I can now process the incoming request, the response is getting a “Content-Encoding: gzip” header even though the response is not encoded. I can verify in Fiddler that the content is not encoded.

    If I do encode the response, the client for the webservice fails. It seems that even though it is sending “Accept-Encoding: gzip”, it does not in fact accept gzip compressed response. I can verify in Fiddler that the response is compressed and Fiddler will decompress it successfully.

    So, now I’m stuck trying to get a stray “Content-Encoding: gzip” header removed from the response. I’ve removed all references I can find to compression from the application, the web.config, and IIS.

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

Sidebar

Related Questions

I have an asp.net .asmx webservice written to handle requests from a third party
I've written an ASP.NET webservice (.asmx style rather than WCF) and I have the
I have an ASP.NET webservice (.asmx) with a simple method that reads something from
We have an ASMX web service which we invoke from our ASP.NET application using
(sorry for the english) I have a ASP .net webservice that get data from
I have a asp.net 3.5 site with a *.asmx that serves several webservice methods.
I have an ASP.NET webservice with along the lines of: [WebService(Namespace = http://internalservice.net/messageprocessing)] [WebServiceBinding(ConformsTo
I have a asp.net asmx service and i would like to convert it to
I have an ASP.Net web site (ASPX and ASMX pages) with a single web.config
We have a ASP.NET website project. In the past, we had been using asmx

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.