Search code examples
silverlightwcf-ria-services

RIA Domainservice - Notfound error - how to get more debug information?


I'm having problems to find enough information to figure out what's missing on my published Silverlight application.

Running the applicaton locally (but with the db connectionstring to the "live" database), everything is running fine.

However, when I try to run at the published remote site it fails. It seems to be related to the db connection, but I don't get any detailed error from the server.

I've added a "debug" code at RIA service completed method

            if (myLoadOperation.HasError)
            {
                MessageBox.Show(myLoadOperation.Error.Message);
                MessageBox.Show(myLoadOperation.Error.InnerException.ToString());
            }

The messagebox displays: Load operation fail for the query 'GetData'. The remote server returned an error : NotFound

What is not found??!?

Additional information I get from JIT Debugger (VS2010) NotFound. at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)

enter image description here

I suspect that it might be a dll related to EF or RIA which may be missing on the remote server, but I'm not quite sure how to identify what's wrong. It's a shared hosting environment.

Could it be located to the MySQL provider?

connectionString="metadata=res://*/Model.Model1.csdl|res://*/Model.Model1.ssdl|res://*/Model.Model1.msl;provider=MySql.Data.MySqlClient;provider connection string="server=xxxxxxxxx;User Id=xxxxxxx;password=xxxxxxxxx;Persist Security Info=True;Allow Zero Datetime=True;Convert Zero Datetime=true;database=xxxxxxxxxx;" providerName="System.Data.EntityClient"

I've uploaded the following dll's to the server's bin folder:

System.ServiceModel.DomainServices.EntityFramework.dll
System.ServiceModel.DomainServices.Hosting.dll
System.ServiceModel.DomainServices.Hosting.OData.dll
System.ServiceModel.DomainServices.Hosting.Server.dll

Solution

  • I found the blog post WCF RIA Services - “Not Found” Error Message to offer several methods of debugging this very generic error message. Using tools like Fiddler and WCF Binary-encoded Message Inspector for Fiddler should give you a better understanding of what the real error message is.