Compressing a web service response for jQuery

后端 未结 5 1039
轮回少年
轮回少年 2020-12-09 12:41

I\'m attempting to gzip a JSON response from an ASMX web service to be consumed on the client-side by jQuery.

My web.config already has httpCompression set like so:

5条回答
  •  温柔的废话
    2020-12-09 13:16

    http://forums.iis.net/t/1160210.aspx?missing+applicationhost+config

    The config file is supposed to be %windir%\system32\inetsrv\config\applicationhost.config.

    (Note that if your application (which is searching for applicationhost.config) is a 32bit app (for example, if you're using a 32bit CMD.EXE), then you won't be able to see the configuration file due to Windows SYSWOW32 redirection)

    A bit of explanation regarding the missing applicationhost.config to change overrideModeDefault attribute to Allow. It's due to SYSWOW32 redirection.

    Also you may not see the configuration files until you

    1. Open the folder by pasting "%windir%\system32\inetsrv\config\" exactly in the File Explorer location bar, and not your text editor
    2. Right-click and edit the file directly in that folder.

    This is because for some reason some 64bit editors still use a faulty file-chooser dialog somehow.

提交回复
热议问题