I had some interesting adventures and in one of them I had to figure out the connection string key for LINQ to SQL DataContext class. I found this interesting blog post by Rick Strahl.
In short he describes that LINQ to SQL designer uses different approaches for web site project and class library one. Here is like the website project designer file is:
public DataClassesDataContext() :
while the class library one is:
public TimeTrakkerContext() :
and you should overwrite it by adding connection string in web.config with name TimeTracker.Properties.Settings.TimeTrackerConnectionString like this
<?xml version="1.0" encoding="utf-8" ?>
connectionString="Data Source=.;Initial Catalog=TimeTracker;Integrated Security=True"
Hmm it works with me too but I remember I had one record in my web.config like this TimeTracker.Properties.Settings.Default.TimeTrackerConnectionString and it worked till I made some change. Go find...