Get InvalidCastException with Glimpse, even though it's not installed. How do I fix this? - asp.net-mvc

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.

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.

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.

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.

Related

Visual studio unable to evaluate anything in debug in any page of my blazor webassembly

I have a blazor webassembly app that is working fine and it is split in webassembly talking to a web api version all .Net Code
I use VS community Edition 2019 and suddenly after many modifications to my code I noticed that I am not able to debug and see any variable content(unable to Evaluate) at any break points anywhere in my web assembly app. I tried with an old version of my code which I know it was working then and same issue, so it is not the code.
I tried upgrading VS to 16.11.75.64347 ( from 16.6 something) without success and even uninstall & reinstall VS with no success.
The only new thing on my station was a windows update this week.
Is someone had something similar happening this week?
ps: What is weird is that I do not not have this problem in my web API solution portion just the webassembly solution.
I think I've been badluck to find many not working thread but finally it was simply to close VS . delete the .vs directory tehn relod the solution and it was OK. It is weird though that many old version of my code that never had this issue had the same problem. It was impossible to have all those .vs not working although I had not touched them in weeks. Anyway it is now working.

Umbraco 7.6.1 Won't Upgrade

I have an Umbraco 7.6.1 site which I'm trying to upgrade to a later version, I'm not sure which version I'm going to yet, but the problem exists no matter the version jump.
The Umbraco project is set up in Visual Code IDE and uses NuGet.
So I go to the projects NuGet package manager and update UmbracoCMS from 7.6.1 to 7.6.2. I don't overwrite files. I've tried overwriting files and checking what it's doing in git, but with no luck either.
All seems well. I then build the project and load up the site in debugging mode. I get asked to log in and pushed to the upgrade page. I then hit continue and shown "Error during installation" instantly. It also tells me to check the logs, which are non-existent.
What am I doing wrong?
Thanks,
Dan
To fix the issue I was having I commented out any rewrite rules I was including in my main Web.config and cleared out everything in the bin folder and re-built the solution. That seemed to have done the trick.

Visual Studio 2013 Azure project: Unable to start debugging

I have an Azure MVC project, and when I try to debug it, it hangs at "Starting the role for the application in the Microsoft Azure compute emulator..."
After a while, if I try to hit the debug button again, it gives the error "The debugger cannot continue running the process. Unable to start debugging."
Any idea what the problem could be? The Azure storage emulator is running when this happens.
There are various things that can cause this and they are not all easy to find! It can be caused by a mismatch between the version of Azure tools referenced in the project and that installed on your PC.
I have had to remove everything related to Azure once and reinstall from scratch!
Another potential problem is if your WebRole.OnStart method keeps erroring, in which case, Azure will attempt to continually restart it and that can carry on for a long time. If this happens, it should eventually tell you that the roles are taking too long to start.
There can be problems if you are trying to use IIS instead of IIS Express, I have never got full IIS to work with the Azure debugger.
Try building a simple Azure app that references a default MVC app as a way to make sure it is not caused by mistakes you have made in your code or configuration. Good luck!
Not sure if this is your exact issue or not but I found the following which fixed my problem: https://stackoverflow.com/a/35407737/1399978. Issue is due to a specific Windows security update (KB3126593). Uninstall the update an everything works as it should. Hope it helps.
I know this might not help a lot of people who have been having similar problems, but I just want to note here that my issues went away when I upgraded to Visual Studio 2015 and Azure 2.8. Thanks for all the input, everybody!

Can't Access Admin CP on nopCommerce v2.60

I have gone here on CodePlex and downloaded nopCommerce v2.60. I am on a Windows 8 Pro 64x Machine, I have .NET Framework and SQLEXPRESS 2012 installed.
The nopCommerce solution installs perfectly fine, no problem ! All front-end stuff work fine. But when I try and access:
localhost:xxxx/admin
I get the following error:
I have already tried re-installing with fresh database and files, but no success. I don't know how to get it to work. Before this use to work no problems at all!
You need to BUILD the whole solution before running. :)
Ok after an exchange of emails with a friend of mine who is really good at C# and has excellent experience with nopCommerce. He too was able to duplicate the problem on his machine running Win 8 Pro 64x along with VS 2012, like me.
It turned out, for some strange reason, one must build, and re-build the solution a couple of times before running it in VS 2012.
So open up your nopCommerce fresh in VS2012, and before you run it, re-build the solution 2 or 3 times, and then run it.
That was the fix for me. So annoying that I spent so much time stuck with it, but I'm glad it works now.

ASP.NET MVC CTP5 Crashing IDE

I've recently installed the MVC CTP5 and VS is now crashing on me when I try to open an aspx, I get the following error in event viewer:
.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506)
I was able to find This post on the asp.net forums relating to the same issue but nobody has had a working solution yet (at least not for me).
Just wondering if anyone else has run into this issue and what they have done to resolve it?
EDIT: Wanted to add that I have tried all the tips in the article and can open the markup with a code editor but was wondering an actual solution had been found to resolve this issue.. Thanks!
EDIT: I don't have this issue on my Vista box, seems to only occur on my XP VM.
I had a problem with Power Commands and Preview 5. If you have Power Commands installed, try updating or uninstalling it to fix the issue.
Here are a steps to work around from the post that work for me:
1.Open project based on CTP5
2.IN solution Explorer, enable "Show All files"
3.Open "bin" folder and delete "Microsoft.Web.Mvc.dll", "System.Web.Mvc.dll", "System.Web.Abstractions.dll", "System.Web.Routing.dll"
4.Open "References" folder, click ONCE "System.Web.Abstractions" and in Properties window change "Copy Local" to true. Repeat same with System.Web.Routing.
5.Build application (Ctrl+Shift+B)
6.Open site.master in designer. VS will not crash.
FYI - Microsoft has released a hotfix that fixes [at least some variations of] this problem:
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&wa=wsignin1.0
http://blogs.msdn.com/jnak/archive/2009/02/26/fix-available-asp-net-mvc-rc-crash-in-a-windows-azure-cloud-service-project.aspx
A bit of a null answer but I’ve been having this too. Not that I restart VS often but cleaning out the bin folder before opening the web project is my workaround.
Have same problem, on vista x64 and vs2008 sp1. Have to do probably something with cleaning bin folder and system.web.routing/abstraction, because it crashes even on webforms project with (mvc) routing in it. When I delete all files from bin, and add references again, it works fine.
Really annoying bug in vs2008+ctp5!

Resources