0
背景:私は、現在atom pub xmlを使用しているSilverlightアプリケーションを持つWCFデータサービスを持っています。ペイロードのサイズを小さくするためにJSONを使用したいと思います。 は私が読んでいることができますJSONサービスから次のコードを使用してWEBGET:SilverlightでWCF Data Services、DataServiceQueryコールからJSONを取得する方法は?
WebClient wc = new WebClient();
wc.Headers["Accept"] = "application/json";
私はDataServiceQuery呼び出しまたは(WebGets用)localContext.BeginExecuteのヘッダーを変更することができますか?
// WCF Data Services Query Proxy
DataServiceQuery<T> query = filterExpression as DataServiceQuery<T>;
// Execute the ASYNC query against the model
query.BeginExecute(new AsyncCallback((iar) =>
{ ...});
または
// Create new context with the WCF service to force only save this entity
VisiconnEDM localContext = new VisiconnEDM(new Uri(entityServiceURL, UriKind.Absolute));
// execute the query asynchronously
localContext.BeginExecute<T>(urlQuery,(IAsyncResult iar) =>{ ...},null);
私に正しい方向に指摘していただきありがとうございます(再度)。パスでも私の質問にお答えいただき、ありがとうございます。私はGZipの使用に関する情報を探しましたが、良いリンクが見つかりませんでした。お勧めはありますか? (私たちのサーバー用のIIS 7はまだありません) – Aligned
GZipはかなりWebサーバー固有のものなので、ベットベットはその点について別の質問をすることになります。残念なことに、それについてはほとんど分かりません。 –