我有一箇舊的應用程序,很長一段時間後,當我嘗試測試它。我得到下面的異常:無法找到請求的.Net Framework數據提供程序。它可能沒有安裝(Informix的)
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();
}
我嘗試做以下解決方案here
</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 ...
就我而言,它是通過在IIS應用程序池高級設置中將「啓用32位應用程序」設置爲「true」來解決的。 –