MS EntLib 4.1 + IIS 7 + inherited connection string = ?

Topics: Data Access Application Block
Aug 6, 2009 at 8:51 PM

I feel like I'm missing something obvious but I can't figure this out. We have a website using MSEntLib41 for the data connections. I got a new 2008 server for Dev, I set the site up, set the database connection string at the server level (go IIS7!), I <-- --/>'d the entire <connectionStrings> block, and now I get:

The requested database (xxx) is not defined in configuration.

Is the inherited connection strings in Server 2008/IIS7 not compatible with MS EntLib 4.1? Is anyone using this successfully?

Aug 7, 2009 at 8:15 AM


I'm not familiar with the configuration inheritance thing, After I did some googling, I have read something about configuration inheritance it says that if you haven't set something explicitly, the child config will inherit the configuration of the parent. Did you set something explicitly? Also please see, if you <clear/> tag inside the <connectionStrings></connectionStrings> tags, its a directive to clear the data that was inherited from the parent file, which can be a possible cause.

 Valiant Dudan
Global Technology and Solutions
Avanade, Inc.


Aug 7, 2009 at 2:41 PM

I googled the same thing, I don't think I'm telling it to not inherit.

I actually removed the entire connectionstrings block. I've since but it back a couple times in various states of emptiness to no avail.

So far I can't find any evidence that anyone has used this successfully, but I can't find any evidence that they haven't. I find it hard to fathom that a major selling point of Server 2008/IIS7 and MSEntLib aren't compatible with each other, given how much attention MS has given them.

Aug 10, 2009 at 6:51 AM

Can you access your database with straight ADO.NET code with an inherited connectionStrings block? Entlib is really just using the system config stuff to pull the connectionStrings, so there may be something else going on. Taking Entlib out of the equation could help narrow things down.