DatabaseFactory.CreateDatabase() error

I am trying to get data access to an SQL Server from a .NET class library running as an Add-In under AutoCAD 2011. I'm using the Data Access Application Block (DAAB). The data acces is in a separate assembly, that have worked perfectly well for similar add-in
scenarios under Word, Excel and Visio. In these scenarios, I just had to make sure that a xxx.dll.config file existed in the folder where the Add-In assembly was deployed. The config file contains:

When calling DatabaseFactory.CreateDatabase() I get the error message: Activation error occurred while trying to get instance of type Database, key ""

I have seen this error message before (using it under Word or Excel), namely when i failed to place a xx.dll.config file in the directory where the add-in resided. So it seems that the enterprise library can't find the config file and thus can't
read the connection strings.

I haven't dealt with add-ins but I know that class libraries don't own configuration files. If you need your entlib code which is in a class library to make use of a config file, you can create an instance of FileConfigurationSource and pass
it to the corresponding factory class of the application block you're using. This approach is discussed in this
blog.