I'm following the ASP MVC Tutorial https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/getting-started The code below is taken from my controller:
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include =
"UserID,UserName,Name,NoOfLogs,timestamps")] User user)
{
if (ModelState.IsValid)
{
db.loggers.Add(user);
db.SaveChanges();
return RedirectToAction("Index");
}
return View(user);
}
My connection String in the web config looks like this:
<connectionStrings><add name="DatabaseConnectionString"
connectionString="Server=.;
database=dolly;uid=dol;pwd=dol;Pooling=true;Max Pool Size=100;Min Pool
Size=4;Network Library=dbmssocn;Application Name=dollymvc;"
providerName="System.Data.SqlClient" />
</connectionStrings>
However I received the exception (mentioned in the headline) as another part of the system using Glimpse for DB connectivity. Is there any workaround for this? A way to cast the glimpse to SQL? It is an ASP .NET MVC5 application I see that the question was asked 4 years ago without an approved answer. Uninstalling Glipmse in not an option Unable to cast object of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection' to type 'System.Data.SqlClient.SqlConnection'