Related To:
WCF GZip Compression Request/Response Processing
WebClient.GetWebRequest(Uri) Method
I want to do that has been said in the first article. I don't know what does Proxy Class means?
I add a WCF web service with name: MyServiceClient.
I wrote this code in a class in APP_Code:
public partial class MyServiceClient : WebClient 
{
    protected override System.Net.WebRequest GetWebRequest(Uri uri)
    {
        System.Net.HttpWebRequest rq = (System.Net.HttpWebRequest)base.GetWebRequest(uri);
        rq.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
        return rq;
    }
}
and calling service code:
using (ServiceReference1.MyServiceClient client = new ServiceReference1.MyServiceClient())
{
    //Call
    client.MyMethod();
}
but when I run this code and call my web service, above code didn't execute.
the second problem is MyServiceClient generated automatically by VS and it's not partial
Where is my mistake?
Thanks