Showing posts with label HTTP. Show all posts
Showing posts with label HTTP. Show all posts

Wednesday, March 25, 2009

How to disable passing of HTTP header "Expect: 100-continue" using HttpWebRequest in .NET Framework in C#?

How to disable passing of HTTP header "Expect: 100-continue" using HttpWebRequest in .NET Framework in C#?
По умолчанию, при выполнении веб-запроса, используя класс HttpWebRequest, .NET Framework добавляет HTTP заголовок (HTTP header) "Expect: 100-continue". Для того, чтобы запретить формирование этого заголовка нужно сделать следующее:

As default when You use HttpWebRequest class to execute web-requests it appends HTTP header "Expect: 100-continue" to it's headers collection. To disable passing of HTTP header "Expect: 100-continue" using HttpWebRequest You can do following:

Tuesday, March 3, 2009

How to enabling Gzip and Deflate HTTP Compression in ASP.NET pages

If your ASP.NET web application doesn't already contain a Global.asax file, create a new one using notepad. Then insert following code in it:


<%@ Application Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.IO.Compression" %>