2

I basically did nothing. Just opened Visual Studio 2012(Ultimate). Created new ASP.NET MVC 4 web application (using Razor Engine). Clicked the green "Run" button - but when it launches exceptions like this are shown on Output window:

"A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll"

and Google chrome seems to become unresponsive after some time.

edit: after some comments I added in Exceptions the Microsoft.CSharp.RuntimeBinder.RuntimeBinderException and this is what happens now when I run the project:

enter image description here

  • Please rewrite exception, cause it's unreadable – Mateusz Rogulski Oct 16 '14 at 07:44
  • Have a look at http://stackoverflow.com/questions/2954531/lots-of-first-chance-microsoft-csharp-runtimebinderexceptions-thrown-when-dealin – Jivan Oct 16 '14 at 07:45
  • @Zane: I saw that but didn't read I thought it was different situation since with me this exceptions happen even without modifying the project. –  Oct 16 '14 at 07:46
  • Try updating your Visual Studio, to it's latest update. Or switch to 2013 – Zeeshan Oct 16 '14 at 07:50
  • In my case, I had turned off this Microsoft.CSharp.RuntimeBinder.RuntimeBinderException – Jivan Oct 16 '14 at 07:51
  • @Zane: I still don't think your link is exactly for my situation because with me this happens without changing new project? –  Oct 16 '14 at 07:51
  • In your solution Explorer, you've imported MvcMovie project, right? – Jivan Oct 16 '14 at 07:53
  • which template did you use when you created the project (Basic, Mobile, Facebook...)? I've never seen scripts pointing at cdnloader.com in the basic templates before – Rhumborl Oct 16 '14 at 07:54
  • @Rhumborl: What do you mean with template I just did. NewProject->ASP.NET MVC4 application->Internet Application with Razor engine –  Oct 16 '14 at 07:56
  • It seems to be a verified bug by Microsoft. Try updating your VS. https://connect.microsoft.com/VisualStudio/feedback/details/813133/bug-in-mvc-5-framework-asp-net-identity-modules – Jivan Oct 16 '14 at 08:08
  • @Zane: ok I will check but the link you mentioned seems to mention MVC 5 though –  Oct 16 '14 at 08:23
  • I think so. In my case, I had used VS 2012 premium(MVC4 project), I had added it to exception list as said in first answer in the first link I gave. – Jivan Oct 16 '14 at 08:33
  • Have you seen this exception without in debug mode? – Jivan Oct 16 '14 at 10:14

1 Answers1

1

What is a first chance exception?

When an application is being debugged, the debugger gets notified whenever an exception is encountered At this point, the application is suspended and the debugger decides how to handle the exception. The first pass through this mechanism is called a "first chance" exception. Depending on the debugger's configuration, it will either resume the application and pass the exception on or it will leave the application suspended and enter debug mode. If the application handles the exception, it continues to run normally.

Does a first chance exception mean there is a problem in my code?

First chance exception messages most often do not mean there is a problem in the code. For applications / components which handle exceptions gracefully, first chance exception messages let the developer know that an exceptional situation was encountered and was handled.

There's nothing to be concerned with. This is normal behavior. So, if you have safely handled your code, you can turn this exception off by navigating to "Debug/Exceptions".

  • From the Debug menu, select Exceptions.
  • Click the "Add..." button on the bottom right.
  • Choose "Common Language Runtime Exceptions" from the Type dropdown.
  • Type "Microsoft.CSharp.RuntimeBinder.RuntimeBinderException" as the name.
  • Click OK.
  • The exception type will now appear on the list. Just deselect it.

Also, have a look at: http://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx

Jivan
  • 1,300
  • 6
  • 21
  • 33