The config looks okay, however the easiest way to fix such issues is to place a try-catch around the linq code and check the error.
public IEnumerable<MMetric> GetSearchresults(string UID, string Aame, string Mname)
{
try
{
ADataContext db = new ADataContext();
IEnumerable<MoMetric> getdata = (from p in db.MMetrics
where p.MID == MID && p.AID == AID
select new MoMetric { DoUId = p.DUId, AID = p.AID, MID = p.MID, EntryDate = p.EntryDate }).AsEnumerable();
}
catch(Exception ex)
{
//ex
}
finally
{
return getdata();
}
}
Hope this helps.