new to enterprise libraries and sofware factory

Dec 6, 2007 at 8:54 AM
i've recently started using the web service software factory to develop an application which must communicate with an external web service and store received information in a local db.
I've used the factory to generate the layers, and i've begin to implement the data access layer. I don't need the service so i haven't implemented anything.
When i try to access the db using databasefactory.createdatabase("dbid") form the repository class, i get a configurationerrorsexception, due to the fact the database is not defined in the configuration. Accessing the the db through the traditional connection tecnique is working.
I've also tried to add an app.config locally to the data access block but it's not working. So i suppose the databasefactory searches informations inside web.config but doesn't find it. Am i right?
And if so how can i make available the configuration information to data access classes? Remember that i don't need to implement a service and that i'm new to this tools that i hoped could simplify my tasks.
thanks in advance

Dec 6, 2007 at 9:57 AM
I think you should add the DB config section to the configuration file that is using your host application (exe, console, web app, etc.). The current file and path for this config file is located under your app domain settings that you can check while you execute the line with databasefactory.createdatabase("dbid").
So checking with:

should give your current config file where you should locate the settings.
Dec 6, 2007 at 10:21 AM
such a simple thing has let me waste a lot of time. Thank a lot for your help