{"id":180769,"date":"2013-05-24T11:31:02","date_gmt":"2013-05-24T07:31:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=180769"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=180769","title":{"rendered":"<span class=\"post_title\">IIS 7: \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u044f JSON \u043e\u0442\u0432\u0435\u0442\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434 \u043c\u043e\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 JSON \u043e\u0442\u0432\u0435\u0442\u044b (\u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,5-1 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430) \u043d\u0435 \u043f\u0430\u043a\u043e\u0432\u0430\u043b\u0438\u0441\u044c. \u0420\u0430\u0431\u043e\u0447\u0430\u044f \u0441\u0432\u044f\u0437\u043a\u0430 Windows 2008 R2 + IIS 7.5 + ASP.NET MVC 4. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430, \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0448\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/p>\n<pre><code class=\"cs\">public ActionResult Index() { \tif (Request.IsAjaxRequest()) \t{ \t\treturn Json(new {\/*\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445*\/}, JsonRequestBehavior.AllowGet); \t} \treturn View(); } <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/p>\n<pre><code class=\"html\">&lt;script src=&quot;http:\/\/ajax.aspnetcdn.com\/ajax\/jquery\/jquery-1.9.0.js&quot;&gt;&lt;\/script&gt;  &lt;script type=&quot;text\/javascript&quot;&gt; \tjQuery(function ($) { \t\t$.ajax({ \t\t\turl: '@Url.Action(&quot;Index&quot;)' \t\t}); \t}) &lt;\/script&gt; <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e, HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/ebe\/505\/841\/ebe50584117aa2d10d939c96a6ae1482.png\"\/><\/p>\n<p>  \u0421\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0438\u0434\u0435\u0442 ajax \u0437\u0430\u043f\u0440\u043e\u0441 <code>X-Requested-With: XMLHttpRequest<\/code> \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 gzip \u0438\u043b\u0438 deflate \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c <code>Accept-Encoding: gzip, deflate<\/code>, \u043d\u0430 \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 json-\u043e\u043c <code>Content-Type: application\/json<\/code>, \u043d\u043e \u0431\u0435\u0437 \u0441\u0436\u0430\u0442\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a <code>Content-Encoding<\/code><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0448\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Administrative Tools -&gt; Server Manager -&gt; Roles -&gt; IIS <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/232\/db9\/c74\/232db9c7442762bc678f96fa760d9a4b.png\"\/><\/p>\n<p>  Static\/Dynamic Content Comprassion \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. (\u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0434\u043b\u044f Windows 7 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432)<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043b\u0438 \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 IIS.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/5a8\/bbb\/c3e\/5a8bbbc3e51db3cb2906d6c6a9710861.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/52a\/8ea\/beb\/52a8eabeb6362ada7b02e47bd9e78132.png\"\/><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0441\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u044e \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 <code>web.config<\/code><\/p>\n<pre><code class=\"xml\">&lt;system.webServer&gt;   &lt;urlCompression doStaticCompression=&quot;false&quot; doDynamicCompression=&quot;false&quot; \/&gt; &lt;\/system.webServer&gt; <\/code><\/pre>\n<p>  \u043b\u0438\u0431\u043e Configuration Editor -&gt; system.webServer -&gt; urlCompression<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/676\/e08\/f26\/676e08f26a8051a28770f8d9f55c31dc.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/f81\/2d9\/e15\/f812d9e159d4d7083e69cb6cf716b6ca.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a2a\/e2c\/b72\/a2ae2cb72936967ce7ebe80ec5501cec.png\"\/><\/p>\n<p>  \u041a\u0430\u0436\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043d\u043e IIS \u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0434\u0430\u0432\u0430\u043b <code>Content-Encoding<\/code> \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u0442\u0430\u043a \u0438 \u043d\u0435 \u043e\u0442\u0434\u0430\u0435\u0442.<\/p>\n<p>  \u0412 \u0445\u043e\u0434 \u043f\u043e\u0448\u0435\u043b <\/p>\n<pre><code class=\"xml\">&lt;system.webServer&gt;     &lt;httpCompression&gt;       &lt;dynamicTypes&gt;         &lt;add mimeType=&quot;application\/json&quot; enabled=&quot;true&quot; \/&gt;         &lt;add mimeType=&quot;application\/json; charset=utf-8&quot; enabled=&quot;true&quot; \/&gt;               &lt;\/dynamicTypes&gt;     &lt;\/httpCompression&gt; &lt;\/system.webServer&gt; <\/code><\/pre>\n<p>  \u0438, \u0443\u0440\u0430, \u043f\u043e\u0431\u0435\u0434\u0430, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u044b\u0439 <code>Content-Encoding: gzip<\/code>. \u041d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u041d\u041e. <code>httpCompression<\/code> \u0441\u0435\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 <code>applicationhost.config<\/code>. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e, \u0447\u0442\u043e, \u043b\u0438\u0431\u043e \u0432\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 IIS, \u043b\u0438\u0431\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 (\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u044b \u043d\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0435\u0440\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c). <\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0430 \u0441\u0436\u0438\u043c\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432\u0430\u043c \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043d\u0430\u0434\u043e. \u0427\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a44\/19a\/809\/a4419a8097dca46f5a40ae71baba20f5.png\"\/><\/p>\n<p>  \u041a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u0441\u044f, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 <code>text\/javascript<\/code>. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0445\u0430\u043a, \u043d\u043e \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e.<\/p>\n<p>  \u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430<\/p>\n<pre><code class=\"cs\">public ActionResult Index() { \tif (Request.IsAjaxRequest()) \t{ \t\treturn new JsonResult() \t\t{ \t\t\tContentType = &quot;text\/javascript&quot;, \t\t\tContentEncoding = Encoding.UTF8, \t\t\tJsonRequestBehavior = JsonRequestBehavior.AllowGet, \t\t\tData = new {\/*\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445*\/} \t\t}; \t} \treturn View(); } <\/code><\/pre>\n<p>  \u0438 \u043f\u0440\u0438 \u043e\u0442\u0432\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>$.ajax<\/code> \u0442\u0443\u0442 \u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0431\u043e <code>$.getJSON<\/code>, \u043b\u0438\u0431\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c <code>json<\/code>.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/p>\n<pre><code class=\"html\">&lt;script src=&quot;http:\/\/ajax.aspnetcdn.com\/ajax\/jquery\/jquery-1.9.0.js&quot;&gt;&lt;\/script&gt;  &lt;script type=&quot;text\/javascript&quot;&gt; \tjQuery(function ($) { \t\t$.ajax({ \t\t\turl: '@Url.Action(&quot;Index&quot;)', \t\t\tdataType: 'json', \t\t}); \t}) &lt;\/script&gt; <\/code><\/pre>\n<p>  \u0418 \u0442\u0440\u0435\u0442\u044c\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c, \u043d\u043e \u043f\u043e\u0434 \u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e (\u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f) \u2013 \u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0438\u043c. <\/p>\n<p>  \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e <a href=\"http:\/\/stackoverflow.com\/questions\/3802107\/how-to-gzip-content-in-asp-net-mvc\">\u0441\u0442\u044d\u043a\u0430<\/a>, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d<\/p>\n<pre><code class=\"cs\">public class CompressAttribute : ActionFilterAttribute {     public override void OnActionExecuting(ActionExecutingContext filterContext)     {          var encodingsAccepted = filterContext.HttpContext.Request.Headers[&quot;Accept-Encoding&quot;];         if (string.IsNullOrEmpty(encodingsAccepted)) return;          encodingsAccepted = encodingsAccepted.ToLowerInvariant();         var response = filterContext.HttpContext.Response;          if (encodingsAccepted.Contains(&quot;deflate&quot;))         {             response.AppendHeader(&quot;Content-encoding&quot;, &quot;deflate&quot;);             response.Filter = new DeflateStream(response.Filter, CompressionMode.Compress);         }         else if (encodingsAccepted.Contains(&quot;gzip&quot;))         {             response.AppendHeader(&quot;Content-encoding&quot;, &quot;gzip&quot;);             response.Filter = new GZipStream(response.Filter, CompressionMode.Compress);         }     } } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0421\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u041f\u043e\u043a\u0430 \u0438\u0433\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0432\u044b\u0448\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c, \u0431\u044b\u043b\u0430 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u0430 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u0441\u0436\u0430\u0442\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 Fiddler \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f \u0438 \u0441\u0430\u043c\u0438\u043c \u0436\u0435 \u0444\u0438\u0434\u043b\u0435\u0440\u043e\u043c \u043e\u043f\u044f\u0442\u044c \u043f\u0430\u043a\u043e\u0432\u0430\u043b\u0441\u043b\u044c\u0442\u0430\u0442 \u0441\u0436\u0430\u0442\u0438\u044f \u0443 \u0444\u0438\u0434\u043b\u0435\u0440\u0430 \u043d\u0430 \u0433\u043b\u0430\u0437 \u0431\u044b\u043b \u043d\u0430 ~10-20% \u043c\u0435\u043d\u044c\u0448\u0435 \u0431\u0430\u0439\u0442. \u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0441\u043d\u043d\u044b\u0445 \u0434\u043b\u044f IIS, \u0443\u043c\u0430 \u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0443. \u041d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 <code>CompressionLevel<\/code>. \u041c\u043e\u0436\u0435\u0442, \u043a\u0442\u043e \u0438\u0437 \u0432\u0430\u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442? \u042d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0441\u0447\u0438\u0442\u0430\u044e \u0432\u0430\u0436\u043d\u044b\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u0430\u0436\u0435\u043d \u043e\u0431\u044a\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0435\u0449\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u0430\u043a\u0438\u043c\u0438 \u0431\u044b \u0431\u0435\u0437\u0443\u043c\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u0438 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0435 \u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/180769\/\"> http:\/\/habrahabr.ru\/post\/180769\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434 \u043c\u043e\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 JSON \u043e\u0442\u0432\u0435\u0442\u044b (\u043f\u043e\u0440\u044f\u0434\u043a\u0430 0,5-1 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430) \u043d\u0435 \u043f\u0430\u043a\u043e\u0432\u0430\u043b\u0438\u0441\u044c. \u0420\u0430\u0431\u043e\u0447\u0430\u044f \u0441\u0432\u044f\u0437\u043a\u0430 Windows 2008 R2 + IIS 7.5 + ASP.NET MVC 4. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430, \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0448\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-180769","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/180769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180769"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/180769\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}