Monday, August 21, 2006

Change IIS Compression with C#

With Exchange SP2 on your front-end Exchange server, you might need to disable the dynamic and static compression with IIS to support GPRS for Windows Mobile Direct Push email.

You can either edit the Metabase.xml file and change the configuration directly like here or you can edit the configuration on the fly using the C#

Here is the code:

cscript C:\Inetpub\AdminScripts\adsutil.vbs set w3svc/1/root/Microsoft-Server-ActiveSync/DoDynamicCompression false

cscript C:\Inetpub\AdminScripts\adsutil.vbs set w3svc/1/root/Microsoft-Server-ActiveSync/DoStaticCompression false

No comments: