在一个系统的machine.config中我们有:
<system.data>
<DbProviderFactories>
<add name="Odbc Data Provider" invariant="System.Data.Odbc"
description=".Net Framework Data Provider for Odbc"
type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OleDb Data Provider" invariant="System.Data.OleDb"
description=".Net Framework Data Provider for OleDb"
type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OracleClient Data Provider"
invariant="System.Data.OracleClient" description=".Net Framework Data
Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory,
System.Data.OracleClient, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
<add name="SqlClient Data Provider"
invariant="System.Data.SqlClient" description=".Net Framework Data
Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory,
System.Data, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
<add name="IBM DB2 for i .NET Provider"
invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider
for IBM i" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26" />
</DbProviderFactories>
</system.data>
然而,DbProviderFactories没有返回任何内容。甚至不是OleDB或ODBC提供程序。 app.exe.config文件没有部分,因此没有。
什么可以阻止这个?