I have two websites both of which are based off the same code base. however one website had some additional work done to it which included adding the MS enterprise lib to it.
I'm in the process of updating the code on the other site so that both sites will be running the same code again.
however, I'm getting the error "The type Database cannot be constructed. You must configure the container to supply this value" when i try to run a page which is using the ent lib.
private static Database dbConn = DatabaseFactory.CreateDatabase("default");
That's the line of code that is failing.
<add name="default" connectionString="Server=localhost;Database=XYZ;User ID=user123;Password=pwd456;"/>
I do have a connection string set up in the web.config. I have a using Microsoft.Practices.EnterpriseLibrary.Data; in the page. I've got the ent lib dlls in my websites bin folder.
This code works fine on the other site. I'm guessing I'm missing something in the web.config or some other setup/configuration step - just not sure what.
Anyone have any ideas how to resolve this?