I have tried the new URL outbound rules with the UrlRewriter 2.0 and it is exactly what I want......except.....it does not work with compression. We use compression on our public website and would like to continue to use it and also use the new outbound
rules with 2.0 version of the UrlRewriter. Is this an intial limitation to the outbound rules and will be available later or is this a strict limitation?
Outbound rewriting can only be applied on un-compressed responses. If the response is already compressed then URL Rewrite Module will report an error if any of the outbound rules is evaluated against that response.
Oubound rewriting cannot be used together with IIS static compression.
Outbound rewriting can be used together with IIS dynamic compression by using the following workaround:
Set the LogRewrittenUrlEnabled registry key: reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0
Make sure that dynamicCompressionBeforeCache property is set to false for the /system.webServer/urlCompression configuration element.
Re-order the IIS modules to have URL Rewrite module (RewriteModule) run before Dynamic Compression module (DynamicCompressionModule). In the IIS Manager user interface in the modules's ordered view the Dynamic Compression module should be above the URL
Rewrite module.
Thanks for the quick response. I added the registry key as specified, set the urlCompression attribute and reordered the modules. The Dynamic Compression setting still could not be set to true or the following error was thrown:
HTTP Error 500.52 - URL Rewrite Module Error.
Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").
Does the Dynamic Compression Module need to move down the list of order modules or does the RewriteModule need to move up the list before the DCompression module?
Also, where does the module reordering take place?....at the Web server level or at the web site level in the IIS Manager?
The Dynamic Compression Module should be above the Rewrite Module on the server level. After you've defined the registry key make sure to do "iisreset".
I moved the DynamicCompression module down the list in the server module list. It appears before the RewriteModule in ordering. Dynamic and Static Compression is still enabled on the Web Server but not enabled on the web site compression settings. This
appears to function fine, but when I enable Dynamic compression on the web site, CSS layout is not functioning correctly for various pages. If I disable Dynamic Compression on the web site, the CSS layout functions fine.
It seems like all compression must be off on the web site for URL outbound rewrites to function correctly. The Web server compression settings do not appear to have an effect.
mwmorris165
Marked as answer by Leo Tang - MSFT on Mar 22, 2010 12:54 AM
I'm running into this error however, I have static and dynamic compression disable on the URL Rewrite server and the backend (proxied) IIS server. I'm trying to proxy a SharePoint 2007 server. When I hit the SharePoint server directly and use a tool like
Live Headers, none of the responses from the server have a Content-Type of gzip or deflate. I've gone through every response header... any idea why I'm still seeing this error?
I am assuming you are usng ARR as the proxy here and URL rewrite in the oubound rewriting. When you test with Live Headers was this done directly from your browser to the Sharepoint server or to the ARR server ?
If either, one thing we are not seeing here are the proxy request headers from the ARR server or the Response headers from sharepoint when the request is proxied. I am noting this becuse the Sharepoint server response ( compressed or not ) is dependent
on the client asking for it the Accept-Encoding header and that may be different in direct vs proxied.
Thanks for the reply. You are correct that I'm using IIS7/ARR/URL Rewrite for the proxy between the client and SharePoint servers. When I test with Live Headers, I'm bypassing the proxy and sending traffic directly to the SharePoint servers to determine
if they are sending compressed responses to the client, which they do not appear to be. Here is an example request/reply from Live Headers (I've removed the domain name):
HTTP/1.1 200 OK
Connection: Keep-Alive
Expires: Mon, 14 Jun 2010 20:30:39 GMT
Date: Tue, 29 Jun 2010 20:30:39 GMT
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 12.0.0.6529
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Last-Modified: Tue, 29 Jun 2010 20:30:39 GMT
Transfer-Encoding: chunked
You can see that the client will accept gizp/deflate compression but the SharePoint server is sending a response typ in text/html. I've reviewed all headers from a page load and none of the responses appear to be coming back to the client compressed.
mwmorris165
3 Posts
URL Rewrite Outbound Rules w/ Compression
Mar 15, 2010 07:16 PM|LINK
I have tried the new URL outbound rules with the UrlRewriter 2.0 and it is exactly what I want......except.....it does not work with compression. We use compression on our public website and would like to continue to use it and also use the new outbound rules with 2.0 version of the UrlRewriter. Is this an intial limitation to the outbound rules and will be available later or is this a strict limitation?
Thanks,
Mike
ruslany
900 Posts
Microsoft
Moderator
Re: URL Rewrite Outbound Rules w/ Compression
Mar 15, 2010 09:23 PM|LINK
Outbound rewriting can only be applied on un-compressed responses. If the response is already compressed then URL Rewrite Module will report an error if any of the outbound rules is evaluated against that response.
Oubound rewriting cannot be used together with IIS static compression.
Outbound rewriting can be used together with IIS dynamic compression by using the following workaround:
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0
mwmorris165
3 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Mar 16, 2010 05:56 PM|LINK
Thanks for the quick response. I added the registry key as specified, set the urlCompression attribute and reordered the modules. The Dynamic Compression setting still could not be set to true or the following error was thrown:
HTTP Error 500.52 - URL Rewrite Module Error.
Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").
Here is the urlCompression configuration element:
<urlCompression doStaticCompression="false" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />
Does the Dynamic Compression Module need to move down the list of order modules or does the RewriteModule need to move up the list before the DCompression module?
Also, where does the module reordering take place?....at the Web server level or at the web site level in the IIS Manager?
Thanks,
Mike
ruslany
900 Posts
Microsoft
Moderator
Re: URL Rewrite Outbound Rules w/ Compression
Mar 16, 2010 07:36 PM|LINK
The Dynamic Compression Module should be above the Rewrite Module on the server level. After you've defined the registry key make sure to do "iisreset".
mwmorris165
3 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Mar 17, 2010 01:19 PM|LINK
I moved the DynamicCompression module down the list in the server module list. It appears before the RewriteModule in ordering. Dynamic and Static Compression is still enabled on the Web Server but not enabled on the web site compression settings. This appears to function fine, but when I enable Dynamic compression on the web site, CSS layout is not functioning correctly for various pages. If I disable Dynamic Compression on the web site, the CSS layout functions fine.
It seems like all compression must be off on the web site for URL outbound rewrites to function correctly. The Web server compression settings do not appear to have an effect.
SpryNM
10 Posts
Re: URL Rewrite Outbound Rules w/ Compression
May 15, 2010 04:40 PM|LINK
Would you be so kind as to attach a screen shot, or full list, of the atypical modules in the Ordered List view? Thank you.
jedobray
30 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jun 29, 2010 08:44 PM|LINK
I'm running into this error however, I have static and dynamic compression disable on the URL Rewrite server and the backend (proxied) IIS server. I'm trying to proxy a SharePoint 2007 server. When I hit the SharePoint server directly and use a tool like Live Headers, none of the responses from the server have a Content-Type of gzip or deflate. I've gone through every response header... any idea why I'm still seeing this error?
richma
1084 Posts
Microsoft
Re: URL Rewrite Outbound Rules w/ Compression
Jul 01, 2010 03:35 PM|LINK
@jedobray
I am assuming you are usng ARR as the proxy here and URL rewrite in the oubound rewriting. When you test with Live Headers was this done directly from your browser to the Sharepoint server or to the ARR server ?
If either, one thing we are not seeing here are the proxy request headers from the ARR server or the Response headers from sharepoint when the request is proxied. I am noting this becuse the Sharepoint server response ( compressed or not ) is dependent on the client asking for it the Accept-Encoding header and that may be different in direct vs proxied.
If you the Sharepoint Server is running on IIS 7.0 you could gather Failed Request tracing to see the Inbound/Outbound headers of the proxied request http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis-7/
If an IIS 6.0 you could traced this Network monitor.
If I am missing something in your configuration please let us know.
thanks
Richard
jedobray
30 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jul 01, 2010 03:44 PM|LINK
Richard,
Thanks for the reply. You are correct that I'm using IIS7/ARR/URL Rewrite for the proxy between the client and SharePoint servers. When I test with Live Headers, I'm bypassing the proxy and sending traffic directly to the SharePoint servers to determine if they are sending compressed responses to the client, which they do not appear to be. Here is an example request/reply from Live Headers (I've removed the domain name):
You can see that the client will accept gizp/deflate compression but the SharePoint server is sending a response typ in text/html. I've reviewed all headers from a page load and none of the responses appear to be coming back to the client compressed.
Thanks,
Jed
jedobray
30 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jul 01, 2010 04:34 PM|LINK
Re-enabling and re-disabling dynamic/static compression on the SharePoint IIS site has resolve this issue. Thanks for your assistance Richard.