私は古いアプリケーションを持っていて、久しぶりにテストしようとすると、次の例外が発生します:
Unable to find the requested .Net Framework Data Provider. It may not be installed.
私のコード:
public DBConnection(string ConnectionString)
{
this.providerFactory = DbProviderFactories.GetFactory("IBM.Data.Informix");//Exception here
this.connection = new IfxConnection();
if (string.IsNullOrEmpty(ConnectionString))
{
this.connection.ConnectionString = ConfigurationManager.ConnectionStrings["r_informix"].ToString();
}
else
{
this.connection.ConnectionString = ConfigurationManager.ConnectionStrings["r_informix"].ToString();
}
command = this.connection.CreateCommand();
}
ここで次の解決策を実行しようとしています
</runtime>
<system.data>
<DbProviderFactories>
<add name="IBM.Data.Informix"
invariant="IBM.Data.Informix.Client"
description="Informix Data Provider for .NET"
type="IBM.Data.Informix,
IBM.Data.Informix,
Version=3.0.0.2,
Culture=Neutral,
PublicKeyToken=7c307b91aa13d208" />
</DbProviderFactories>
</system.data>
but In vain ...