Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am working on a desktop windows forms application in C#. I want to use enterprise liberary in project in Data access layer. I have added app.cofig in Class Liberary project( Data access Layer) to configure it. My app.config is
<configuration>
  <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
  </configSections>
  <dataConfiguration defaultDatabase="MRS" />
  <connectionStrings>
    <add name="MRS" connectionString="Data Source=VU-39305EF5F3B7\SQLEXPRESS;Initial Catalog=MRS;Integrated Security=True;"
        providerName="System.Data.SqlClient" />
  </connectionStrings>
</configuration>

Now when I run my application for db operation. It is giving this error
Activation error occured while trying to get instance of type Database, key "MRS"

Please guide what is probelm and how to resolve it ??
Posted

1 solution

 
Share this answer
 
Comments
touseef4pk 21-Feb-12 12:16pm    
extremply pooor and cheaaap ans..
_Zorro_ 21-Feb-12 12:31pm    
Well, not as much as your question is... What I'm telling you is to google for your error and try to understand what's going on, you know, what you should always do before posting any question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900