<DBContext> connectionString setting not found in config file
This is a newbie question, i am able to set up my data model in the LINQPad Connection window, but when i hit the 'Test' button i get the following message:
---------------------------
LINQPad
---------------------------
The database connection is valid, but the following exception
was thrown when trying to instantiate the custom ObjectContext:
The type initializer for 'DBContext' threw an exception.
Inner Exception: DBContext connectionString setting not found in config file
---------------------------
OK
---------------------------
I have checked in both a configuration file for LINQPad and a configuration file for my custom assembly and they now both have a connectionString with proper values, what config file is this message referring to?
This is what i have in the configuration files:
<connectionStrings>
<add name="DBContext" connectionString="metadata=res://*/DBContext.csdl|res://*/DBContext.ssdl|res://*/DBContext.msl;provider=System.Data.SqlClient;provider connection string="data source=(local)\sql2008;initial catalog=DBDev;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/>
</connectionStrings>
Thanks,
Daniel Miranda
---------------------------
LINQPad
---------------------------
The database connection is valid, but the following exception
was thrown when trying to instantiate the custom ObjectContext:
The type initializer for 'DBContext' threw an exception.
Inner Exception: DBContext connectionString setting not found in config file
---------------------------
OK
---------------------------
I have checked in both a configuration file for LINQPad and a configuration file for my custom assembly and they now both have a connectionString with proper values, what config file is this message referring to?
This is what i have in the configuration files:
<connectionStrings>
<add name="DBContext" connectionString="metadata=res://*/DBContext.csdl|res://*/DBContext.ssdl|res://*/DBContext.msl;provider=System.Data.SqlClient;provider connection string="data source=(local)\sql2008;initial catalog=DBDev;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/>
</connectionStrings>
Thanks,
Daniel Miranda
Comments