MetadataException: The supplied schema is invalid.

c# entity-framework mysql ria silverlight


I have been working on a Silverlight application. This application is supposed to be hosted with Godaddy.

The application connects to MySql as it's backend database and uses entity framework.

The application works correctly on Visual Studio. However, when I moved the files to Godaddy, I started having some issues. The application started throwing a MetadataException.

I have used Fiddler to tracker the issue. The first WCF request is terminated correctly, however subsequent request fail with header code 500. Throwing the following exception.

I would appreciate helping me through this issue as I have tried many solution.

  • I have deleted the EDMX model completely and removed the entry from connection strings in the config file. Then recreated the edmx file from the database again.
  • I have replaced the metadata tag in the connectionString with "metadata="res://*/" with no luck

note: I have another Silverlight application hosted on Godaddy which uses MS SQL SERVER that application works correctly.

[MetadataException: Schema specified is not valid. Errors: 
KaneeFollowUpModel.ssdl(2,93) : error 0175: The specified store provider cannot be found in the configuration, or is not valid.]
System.Data.Metadata.Edm.Loader.ThrowOnNonWarningErrors() +8566285
System.Data.Metadata.Edm.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths) +181
System.Data.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, DbProviderManifest& providerManifest, DbProviderFactory& providerFactory, String& providerManifestToken, Memoizer`2& cachedCTypeFunction) +211
System.Data.Metadata.Edm.StoreItemCollection..ctor(String[] filePaths) +420
System.Data.Mapping.MetadataWorkspaceUtilities.CreateMetadataWorkspaceFromResources(Type contextType, Type baseContextType) +298
System.Data.Mapping.MetadataWorkspaceUtilities.CreateMetadataWorkspace(Type contextType) +28
5/20/2012 12:13:48 PM

Popular Answer

I have out the issue as mentioned by Pawel and the thread provided by Ladislav Mrnka was to do with the MYSQL EF provider.

I did the following to solve the issue:

1) made sure Mysql.Web, Mysql.Data and Mysql.Data.Entity were added to references

2) added:

<add assembly="MySql.Data, Version=, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>

to the assemblies section in the config file

3) added the following section to the config file:

    <add name="MySQL Data Provider" 
         description=".Net Framework Data Provider for MySQL"  
         type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=,     Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
5/22/2012 9:13:44 AM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow