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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:58:36+00:00 2026-06-02T06:58:36+00:00

I have a MVC3 site running on IIS 7.5 that has compression enabled. The

  • 0

I have a MVC3 site running on IIS 7.5 that has compression enabled.

The GZip compression is working on all pages of the site except for a few pages where I manually change the content type to application/xhtml+xml (this is necessary for various reasons) in the controller (Response.ContentType = "application/xhtml+xml";).

What about this content type would cause GZip not to work, and is there any way around that?

  • 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-06-02T06:58:39+00:00Added an answer on June 2, 2026 at 6:58 am

    application/xhtml+xml is not one of the built in mime types that IIS compression knows to compress. You must enable compression for this mime-type explicitly.

    I’ll assume you want the compression to be enabled whether it’s a static file or dynamically generated. To do this you must add the mime-type to the machine level config’s system.webServer/httpCompression staticTypes and dynamicTypes sections. One of the simpler ways to do this with a deployment script is to just use appcmd.exe like so:

    Adding support for compressing static content

    appcmd.exe set config -section:system.webServer/httpCompression /+"staticTypes.[mimeType='application/xhtml%%2bxml',enabled='True']" /commit:apphost
    

    Adding support for compressing dynamic content

    appcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/xhtml%%2bxml',enabled='True']" /commit:apphost
    

    Obviously you can use this same approach for any other content types you might want compressed.

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

Sidebar

Related Questions

I have a web site using .NET 4 and ASP.NET MVC3 running in IIS
I have a MVC3 site in .Net 4.0 running on IIS6 with extensionless manner
I have an ASP.NET MVC 3 web site that uses Windows Authentication running under
I'm new to MVC3 and have been working on a small site using EF
I have Elmah running on my MVC 3 site, and have everything working on
I have an MVC3 site that needs to handle user posts. I am trying
I have an MVC3 site that I've setup for testing another site - most
I'm building my first MVC3 website and have connected my site to a mdf
I have an ASP.NET MVC 3 site that makes use of a ClientDependency framework
I have a MVC3 project for running on the iPad in the web-app mode.

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.