2012-05-20 25 views
1

我一直在研究Silverlight應用程序。這個應用程序應該與Godaddy託管。MetadataException:指定的模式無效

該應用程序連接到MySql,因爲它是後端數據庫並使用實體框架。

該應用程序在Visual Studio上正常工作。但是,當我將文件移至Godaddy時,我開始出現一些問題。該應用程序開始拋出MetadataException。

我已經使用提琴手跟蹤問題。第一個WCF請求被正確終止,但後續請求失敗,頭代碼爲500.拋出以下異常。

我希望能幫助我解決這個問題,因爲我嘗試了很多解決方案。

  • 我已經完全刪除了EDMX模型,並從配置文件中的連接字符串中刪除了條目。然後再次從數據庫重新創建edmx文件。
  • 我已經取代在ConnectionString元數據標籤與 「元數據=」 RES:// * /」,沒有運氣

注: 我必須託管在Godaddy的另一Silverlight應用程序,它使用MS SQL SERVER該應用程序能夠正常運行。

[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 
.... 
.... 
.... 
+0

如果兩臺計算機上的配置與您試圖使用的godaddy機器上未安裝MySql EF提供程序相同。 – Pawel

+0

[MySQL實體框架錯誤 - 指定的存儲提供程序在配置中找不到,或者無效]的可能重複(http://stackoverflow.com/questions/8705108/mysql-entity-framework-error-the-specified -store-提供商不能待發現式-T) –

回答

0

我出了問題,因爲由帕維爾提到和拉吉斯拉夫Mrnka提供的線程與MySQL EF供應商做。

我做了以下解決問題:

1)確信Mysql.Web,Mysql.Data和Mysql.Data.Entity加入引用

2)補充說:

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

以在配置的組件部分文件

3)增加了以下部分的配置文件:

<DbProviderFactories> 
    <add name="MySQL Data Provider" 
     invariant="MySql.Data.MySqlClient" 
     description=".Net Framework Data Provider for MySQL" 
     type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.4.4.0,  Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> 
    </DbProviderFactories>