From: Bradburn, G. (LNG-RDU) <gre...@le...> - 2013-08-02 14:02:02
|
Hernán, Can you elaborate on what you mean by “Firebird’s entry”? The app.config for the application, where Firebird works, has the following relevant entries: <configuration> <configSections> <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/> <section name="dataProviderFactory" type="Juris.DataAccessLayer.Factory.DataProviderFactoryConfiguration, Juris.DataAccessLayer.Factory" allowLocation="true" allowDefinition="Everywhere" restartOnExternalChanges="true"/> <section name="netTiersService" type="Juris.DataAccessLayer.Bases.NetTiersServiceSection, Juris.DataAccessLayer" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/> </configSections> <system.data> <DbProviderFactories> <add name="Firebird Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient"/> </DbProviderFactories> </system.data> <netTiersService> <providers> <add name="FirebirdNetTiersProvider" type="Juris.DataAccessLayer.FirebirdClient.FirebirdNetTiersProvider, Juris.DataAccessLayer.FirebirdClient" useStoredProcedure="true" providerInvariantName="FirebirdSql.Data.FirebirdClient" providerName="FirebirdSql.Data.FirebirdClient" entityFactoryType="Juris.Entities.EntityFactory" enableEntityTracking="true" enableMethodAuthorization="false" useEntityFactory="true" commandTimeout="30"/> <add name="SqlNetTiersProvider" useStoredProcedure="true" enableEntityTracking="true" type="Juris.DataAccessLayer.SqlClient.SqlNetTiersProvider, Juris.DataAccessLayer.SqlClient" connectionStringName="SqlServerConnectionString" providerInvariantName="System.Data.SqlClient" entityFactoryType="Juris.Entities.EntityFactory" enableMethodAuthorization="false" useEntityFactory="true" commandTimeout="30"/> <add name="WsNetTiersProvider" type="Juris.DataAccessLayer.WebServiceClient.WsNetTiersProvider, Juris.DataAccessLayer.WebServiceClient" url="http://localhost/NetTiersWS/JurisDataAccessLayerWebServices.asmx" commandTimeout="100"/> <add name="MirrorNetTiersProvider" useStoredProcedure="true" enableEntityTracking="true" type="Juris.DataAccessLayer.SqlClient.SqlNetTiersProvider, Juris.DataAccessLayer.SqlClient" connectionStringName="SqlServerConnectionString" providerInvariantName="System.Data.SqlClient" entityFactoryType="Juris.Entities.EntityFactory" enableMethodAuthorization="false" useEntityFactory="true"/> </providers> </netTiersService> The app.config for the unit test project contains this: <configSections> <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/> <section name="dataProviderFactory" type="Juris.DataAccessLayer.Factory.DataProviderFactoryConfiguration, Juris.DataAccessLayer.Factory" allowLocation="true" allowDefinition="Everywhere" restartOnExternalChanges="true"/> <section name="netTiersService" type="Juris.DataAccessLayer.Bases.NetTiersServiceSection, Juris.DataAccessLayer" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/> </configSections> <dataProviderFactory> <providers> <provider dataSource="local" accessMode="local" connectionType="disconnected" name="FirebirdNetTiersProvider"/> <provider dataSource="remote" accessMode="direct" connectionType="directConnect" name="SqlNetTiersProvider"/> <provider dataSource="remote" accessMode="web" connectionType="webConnect" name="WsNetTiersProvider"/> </providers> </dataProviderFactory> <system.data> <DbProviderFactories> <add name="Firebird Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient"/> </DbProviderFactories> </system.data> <netTiersService> <providers> <add name="FirebirdNetTiersProvider" type="Juris.DataAccessLayer.FirebirdClient.FirebirdNetTiersProvider, Juris.DataAccessLayer.FirebirdClient" useStoredProcedure="true" providerInvariantName="FirebirdSql.Data.FirebirdClient" providerName="FirebirdSql.Data.FirebirdClient" entityFactoryType="Juris.Entities.EntityFactory" enableEntityTracking="true" enableMethodAuthorization="false" useEntityFactory="true" pooling="false"/> <add name="SqlNetTiersProvider" useStoredProcedure="true" enableEntityTracking="true" type="Juris.DataAccessLayer.SqlClient.SqlNetTiersProvider, Juris.DataAccessLayer.SqlClient" providerInvariantName="System.Data.SqlClient" entityFactoryType="Juris.Entities.EntityFactory" enableMethodAuthorization="false"/> <add name="WsNetTiersProvider" type="Juris.DataAccessLayer.WebServiceClient.WsNetTiersProvider, Juris.DataAccessLayer.WebServiceClient" url="http://localhost/NetTiersWS/JurisDataAccessLayerWebServices.asmx"/> </providers> </netTiersService> What is it that I am missing? Thanks, Greg. From: Hernán Martínez [mailto:her...@ob...] Sent: Thursday, August 01, 2013 4:57 PM To: For users and developers of the Firebird .NET providers Cc: fir...@li... Subject: Re: [Firebird-net-provider] Error finding .Net provider but only in unit tests You want to add Firebird's entry also in the test project app.config file. Include a remove before the add too. Hernán MF S El 01/08/2013, a las 22:08, "Bradburn, Greg (LNG-RDU)" <gre...@le...<mailto:gre...@le...>> escribió: Greetings, We are using Firebird 2.0.1 in embedded mode and everything works fine in the application but whenever I try to run unit tests against Firebird I get either: System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) or System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider. at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) The former if have an entry in machine.config for FirebirdSql.Data.FirebirdClient and the latter if I remove it. I have spent days trying to diagnose this. I have verified that all the required dlls and supporting files for Firebird embedded get copied to the TestResults\Out folder. I had this issue in VS 2010 and am still having the issue after migrating my projects to VS 2012 and .Net 4.5. I tried upgrading Firebird to 2.5.2 and the Firebird Client to 3.0.2 and had the exact same results. Thanks in advance for any help you can offer on this. Regards, Greg B. Regards, Greg. Greg Bradburn Sr. Software Engineer LexisNexis – Business of Law Software Solutions 2000 Regency Pkwy, Suite 600 Cary, NC 27518 919-297-1788 Direct ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Firebird-net-provider mailing list Fir...@li...<mailto:Fir...@li...> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |