anon
anon

Reputation:

Strange exception MVC 4 project

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

Upvotes: 2

Views: 804

Answers (1)

Jivan
Jivan

Reputation: 1320

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

Upvotes: 1

Related Questions