0

I am getting an exception (System.Web.HTTPException) in a fresh ASP.NET application. Steps to reproduce: Visual Studio 2017 .NET Framework 4.6.2

  1. Create new project of type ASP.NET Web Application (.NET Framework)

  2. Select MVC as the project template

  3. System.Web.HttpException in BundleConfig.cs, line 11

    bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                "~/Scripts/jquery-{version}.js"));
    
  4. Click Continue

  5. 4 additional exceptions of type:

    Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll

Any ideas why a fresh project would throw exceptions like this?

Thanks, Doug

Community
  • 1
  • 1
AeroClassics
  • 1,074
  • 9
  • 19
  • No. The only thing that comes to mind is a bad Installation or that your IDE was unable to load the jquery Bundle. Also It doesn't happen on my Mashine :) – Brezelmann Mar 28 '19 at 15:31
  • @Brezelmann Thanks. I will check to see if VS 2017 is installed correctly or not. It does look like the jQuery bundel was there. – AeroClassics Mar 28 '19 at 17:25

1 Answers1

0

Can you try these steps

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.

More reference Lots of first chance Microsoft.CSharp.RuntimeBinderExceptions thrown when dealing with dynamics

Hien Nguyen
  • 24,551
  • 7
  • 52
  • 62
  • thank you very much! As it turns out there is some kind of problem wirh VS 2017 and I just did not have to to completely uninstall the reinstall. I switch back to VS 2015. Works mu better now. – AeroClassics Mar 29 '19 at 19:21