3

I had a Visual Studio 2012 project that I imported into Visual Studio 2013. I upgraded Entity Framework to version 6. I got the following error when I started the first time: Unable to cast object of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection' to type 'System.Data.SqlClient.SqlConnection'. Since this was a prototype app, I wasn't concerned about Glimpse, so I uninstalled it via NuGet, which removed the error and I carried on.

Now, I'm deploying to Azure websites and I keep getting that error!

  • Glimpse is uninstalled.
  • It works fine in release and debug locally.
  • I tried putting System.Data.Metadata.Edm.MetadataWorkspace.ClearCache(); in the Application_Start like this says. (Even though I don't run queries in Application_Start

I suspect I have a caching problem on Azure, but I'm not sure. How do I get the Azure deployment to remove Glimpse like the local install has?

Update: "Fixed"it by deleting the azure website and recreating it. Would still love to hear how to do with this without going with the nuclear option.

ageektrapped
  • 14,482
  • 7
  • 57
  • 72

3 Answers3

1

This is a bug and is fixed in the release that will hopefully be going out tomorrow - see here for more details https://github.com/Glimpse/Glimpse/issues/540.

anthonyv
  • 2,455
  • 1
  • 14
  • 18
  • Thanks! Good to know. The problem in Glimpse was tangential to the question, though. Is it still a bug with Glimpse if I had uninstalled it? I think there's a caching issue with Azure. The problem would probably come up with another component too. – ageektrapped Nov 12 '13 at 11:46
  • This fix has gone live. – anthonyv Nov 12 '13 at 19:33
1

I also faced this error and later on found the resolution.

Issue was that I had MVC5 and EF6 based solution and i had imported Glimpse.mvc4 and Glimpse.ef5 packages and they were incompatible i think .

Once i upgraded to Glimpse.EF6 and Glimpse.MVC5 it started working fine.

Avinash Barnwal
  • 181
  • 1
  • 7
1

also had the same one, when I opted to remove Glimpse. you can prevent this by deleting the bin/ and obj/ folders from your project folder(s) as Glimpse is copied to your bin during debugging.

AceMark
  • 701
  • 1
  • 11
  • 21