Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...Service framework compressionService framework compression
Previous
 
Next
New Post
12/18/2014 6:02 AM
 

I have a demo DNN website that I'm using to test service framework.  The site is hosted on IIS 8.5.  I have enabled dynamic content compression on the server and compression is working fine when accessing the site.  However, when I access my service WebAPI compression is not working.  I have modified (C:\Windows\System32\inetsrv\config\applicationHost.config) as suggested on other forums to have the following:

        <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">

            <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />

            <staticTypes>

                <add mimeType="text/*" enabled="true" />

                <add mimeType="message/*" enabled="true" />

                <add mimeType="application/javascript" enabled="true" />

                <add mimeType="application/atom+xml" enabled="true" />

                <add mimeType="application/xaml+xml" enabled="true" />

<add mimeType="application/json" enabled="true" />

<add mimeType="application/xml; charset=utf-8" enabled="true" />

<add mimeType="application/json; charset=utf-8" enabled="true" />       

                <!-- <add mimeType="*/*" enabled="false" />  -->

            </staticTypes>

            <dynamicTypes>

                <add mimeType="text/*" enabled="true" />

                <add mimeType="message/*" enabled="true" />

                <add mimeType="application/x-javascript" enabled="true" />

                <add mimeType="application/javascript" enabled="true" />

<add mimeType="application/json" enabled="true" />

<add mimeType="application/xml; charset=utf-8" enabled="true" />

<add mimeType="application/json; charset=utf-8" enabled="true" />       

<!-- <add mimeType="*/*" enabled="false" /> -->

            </dynamicTypes>

        </httpCompression>

and restarted IIS after modifying the file without success.

 http://54.174.210.20/lilypad/ ----->> is compressed

but not http://54.174.210.20/lilypad/desktopmodules/DataExchange/API/Example/GetData

Am I missing something?

 

 
New Post
12/18/2014 7:04 PM
 
I'd suggest you use a http proxy such as fiddler to verify that you are sending/returning the right contenttype (in case you are using a plain html text)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
12/18/2014 10:59 PM
 

Thank you for the respond.  I actually did use Fiddler and Google Developer Tools to track the request and response.  In summary, when only accessing the Lilypad homepage (Plain DNN main page), I get the following response headers:

HTTP/1.1 200 OK

Cache-Control: private

Content-Type: text/html; charset=utf-8

Content-Encoding: gzip

Vary: Accept-Encoding

Server: Microsoft-IIS/8.5

Set-Cookie: dnn_IsMobile=False; path=/; HttpOnly

Set-Cookie: language=en-US; path=/; HttpOnly

Set-Cookie: dnn_IsMobile=False; path=/; HttpOnly

Set-Cookie: language=en-US; path=/; HttpOnly

Date: Fri, 19 Dec 2014 03:49:21 GMT

Content-Length: 7540 

----

Yet, when I access the WebAPI module, I get the following:

HTTP/1.1 200 OK

Cache-Control: no-cache

Pragma: no-cache

Content-Type: application/xml; charset=utf-8

Expires: -1

Server: Microsoft-IIS/8.5

Set-Cookie: dnn_IsMobile=False; path=/; HttpOnly

Set-Cookie: dnn_IsMobile=False; path=/; HttpOnly

Set-Cookie: language=en-US; path=/; HttpOnly

Date: Fri, 19 Dec 2014 03:50:14 GMT

Content-Length: 3187900

------

As you can see, the exact Content-Type  in the second response headers has been added to the MIME type for the dynamic compression.

 
New Post
12/19/2014 4:38 AM
Accepted Answer 
Finally, I got it fixed. for some reason making changes to the (C:\Windows\System32\inetsrv\config\applicationHost.config) was useless. I had to go to IIS managemnt, select the server and use the configuration Editor to add my dynamic MIME types for compression. it is amazing how making a call to get 10,000 records is a matter of a few seconds now. Thanks for all who tried to help. Feel free to try it and let me know :)

http://54.174.210.20/lilypad/desktopmodules/DataExchange/API/Example/GetData?Count=10000&Type=JSON

or Type=XML

 

 
New Post
12/19/2014 4:38 AM
 
Finally, I got it fixed. for some reason making changes to the (C:\Windows\System32\inetsrv\config\applicationHost.config) was useless. I had to go to IIS managemnt, select the server and use the configuration Editor to add my dynamic MIME types for compression. it is amazing how making a call to get 10,000 records is a matter of a few seconds now. Thanks for all who tried to help.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...Service framework compressionService framework compression


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out