I am trying to figure out why this connection of Linq to Sql will not work.
I have the dbml and DataContext set up, and everything works fine. If I call this function from within the same project everything works fine. It is all set to public , and I want to call this function from another project. When I do so I get the following exception:
The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.
not much more detail in that exception except this :
"Configuration system failed to initialize"
the error is being thrown on this line , which is the firstline of the function
using (EngageDataContext db = new EngageDataContext())
{
like I said , I know that everything is set up for the dbml , connection string and datacontext properly because it works when called from within the same project. Anyone have any idea whats going on?