我有一個存儲過程,返回SQL Server中的數據庫郵件的狀態,返回字符串「已停止」或「已啓動」。我必須在C#,Silverlight和WCF數據服務中使用它。WCF和錯誤存儲過程
這裏是我的代碼:
contex.BeginExecute<String>(new Uri(uri2), OnQueryComplete3, null);
...
private void OnQueryComplete3(IAsyncResult result)
{
grLog.ItemsSource = contex.EndExecute<String>(result).ToList<String>();
}
而且我有錯誤:
Error processing response stream. The XML element contains mixed content.
的服務操作:
[WebGet]
public IQueryable<String> Status_Serwer()
{
return CurrentDataSource
.status_serwer()
.AsQueryable();
}
我覺得」 .NET 4.0仍然不支持物化來自返回原始或複雜類型(或那些集合)的服務操作的響應。「在這個討論http://go4answers.webhost4life.com/Example/incoking-webget-throws-exception-56000.aspx。這是真的嗎?
你能找出什麼的'contex.EndExecute(結果)結果'是,並將其張貼在這裏? –
2012-08-09 16:49:17
更好 - 您能否使用Fiddler(或任何其他HTTP跟蹤器)等工具抓取響應並將其發佈到此處?另外,如何在服務中定義服務操作(什麼是返回類型)? – 2012-08-09 17:35:00