0
雖然我試圖使用WCF RIA爲Silverlight應用程序加載數據,但得到錯誤 作爲波紋管。錯誤4004,與Silverlight 4 WCF RIA與遠程數據庫
消息:未處理的錯誤在Silverlight應用程序
代碼:4004
類別:ManagedRuntimeError
消息:System.ServiceModel.DomainServices.Client.DomainOperationException:加載操作失敗查詢
我正在使用遠程數據庫,它正確地認證用戶,連接到數據庫但數據綁定失敗。代碼:
public MainPage()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(MainPage_Loaded);
}
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
// create a context to the WCF RIA service and call the RIA service method
// to get the list of all customers.
var context = new ExpertIssueTracker.Web.ITDomainContext();
dataGrid1.ItemsSource = context.IT_USERs;
context.Load(context.GetIT_USERQuery());
}
我試過了提琴手,但無法弄清楚確切的原因。連接到遠程託管數據庫時,我們有任何特定的問題嗎?
WCF RIA錯誤是可怕的。每次我看到這條消息時,都是因爲數據庫連接字符串在某種程度上不正確。 – Geoff 2010-11-22 20:48:22