0
votes

While I am trying to use WCF RIA to load data for silverlight app but getting an error as bellow.

Message: Unhandled Error in Silverlight Application

Code: 4004

Category: ManagedRuntimeError

Message: System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query

I am using remote database , it authenticate the user properly , connect to database but data binding failed.The code :

    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());
        }

I tried fiddler but could not figured out the exact reason .Do we have any specific issue while connecting to remote hosted database ?

1
WCF RIA errors are terrible. Every time I've seen this message it is because the database connection string was somehow incorrect.Geoff
Then What is the solution for it ? connectionString="metadata=res://*/ITModel.csdl|res://*/ITModel.ssdl|res://*/ITModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=**Source***;Initial Catalog=***DBNAME***;Persist Security Info=True;User ID=***DBNAME***;Password=***Password***;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />Manas

1 Answers

0
votes

Ok i got it ,the issue was with shared hosting .They were running on .Net4 beta .