Bom Dia, Pessoal.
Estive analisando o post do Israel, segue o link http://www.israelaece.com/post/Compressao-em-Servicos-WCF.aspx não consegui implementar pois é
retornado um erro na seguinte linha, estou usando Silverlight com WCF e .NET4.
using (ServiceClient p = new ServiceClient())
{
using (new OperationContextScope(p.InnerChannel))
{
var props = new HttpRequestMessageProperty();
props.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate");
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = props;
Console.WriteLine(p.RetornaUmTextoMuitoGrande());
}
}
Linha com erro:
props.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate");
"System.Net.WebHeaderCollection' does not contain a definition for 'Add' and the best extension method overload
'SilverFlow.Controls.GeometryExtensions.Add(System.Windows.Rect, double, double)' has some invalid arguments"
att