0

ADO.NETエンティティデータモデルを介してmysqlデータベースを使用するSilverlightアプリケーションを展開しています。

ホストからアプリケーションを実行しようとすると、WCFサービスは正常に機能しますが、wcfサービスから呼び出すとサーバー例外が発生します。

要求された.NetFrameworkデータプロバイダーが見つかりません。インストールされていない可能性があります。System.Data.Common.DbProviderFactories.GetFactory(String ProviderInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(StringproviderString)。

web.configの私のコードは次のように定義されています

  <connectionStrings>
<add name="modelEntities"  
providerName="System.Data.EntityClient"
connectionString="metadata=res://*;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;User Id=userid;password=mypass;database=mydb;&quot;"/>
 </connectionStrings>

私のローカルプロジェクトでは、mysqlなどの.NETコネクタをインストールしたので正常に動作します。ホストは.net3.5linqとmysqlをサポートします。これを修正するには何をする必要がありますか?


追加してみました

<system.data>
<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.2.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>

とMySql.Data.dllとMySql.Data.Entity.dllがbinフォルダーにあり、エラーが発生します。

Schema specified is not valid. Errors:     
MySql.Data.Entity.Properties.SchemaDefinition-5.1.ssdl(4,9) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken '5' is different from '5.1' that was encountered earlier.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(4,9) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken '5' is different from '5.1' that was encountered earlier.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(7,4) : error 0019: The EntityContainer name must be unique. An EntityContainer with the name 'Schema' is already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(336,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.Table' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(348,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.TableColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(374,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.View' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(386,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ViewColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(412,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.Function' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(437,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.Procedure' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(447,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.Parameter' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(471,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.Constraint' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(483,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.CheckConstraint' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(491,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ConstraintColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(500,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ForeignKeyConstraint' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(509,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ForeignKey' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(520,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ViewConstraint' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(535,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.TableTableConstraint' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(548,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ConstraintConstraintColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(561,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ConstraintForeignKey' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(574,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.FromForeignKeyColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(587,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ToForeignKeyColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(600,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.TableTableColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(613,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ViewViewColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(626,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.FunctionFunctionParameter' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(639,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ProcedureProcedureParameter' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(652,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ViewViewConstraint' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(665,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ViewConstraintConstraintColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(678,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ViewConstraintForeignKey' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(691,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.FromForeignKeyViewColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-5.0.ssdl(704,4) : error 0019: Each type name in a schema must be unique. Type name 'MySqlClient.ToForeignKeyViewColumn' was already defined.    
MySql.Data.Entity.Properties.SchemaDefinition-6.0.ssdl(4,9) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken '5' is different from '5.1' that was encountered earlier.

これは何ですか?なぜこれを展開するのがとても難しいのですか?

4

3 に答える 3

0

最初に Entity フレームワークをいくつかのデータベースに向けてから、mysql に移行しましたか?

誰かが同じような問題を抱えているようです

ここをクリックして、彼に有効なエラーと解決策を確認してください

于 2010-01-04T22:48:18.910 に答える
0

MySql.Data への明示的な参照を追加してから、ホスティング アカウントで MySql.Data.dll のコピーが bin フォルダーに含まれていることを確認します。

于 2009-12-24T17:49:41.980 に答える