Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

Error running the default ValuesController Get()

Hi, I'm using Visual Studio 2017.  I created a C# Web API with MVC checked project.  It comes  with a basic structure already.  It has the HomeController and the ValuesController cdoe in the project explorer.  Build and ran the problem and it lands and shows the Home's Index view page no problem.  However, I get error when I accessed the ValuesController Get API.  Please see the attached image.  With this message and my break point, it does reach and execute the Get() API no problem by me adding /api/Values
But then the browser would ask if I want to save or open, if I select open then I got the error.  It's having problem opening and displaying the values.json file.  

The ValuesController.Get() api doesn't return a ActionResult so I assume it doesn't need a View created and the context menu doesn't show adding view is an option to it.  Is this correct?

  I looked up the error online and it seems it'a registry corruption issue.  I'm running Visual Studio 2017 Enterprise installer again in Repair mode.  I'm hoping that would fix it or I would have to mess with the registry values.

I'm also attaching the screen cap pop up text at the bottom of the screen when I call the Get or Get id api.

Thank you
json-error.jpg
Get-err.jpg
Get-id-err.jpg
ASKER CERTIFIED SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca
lapucca

ASKER

Thank you!  I thought I was losing my mind!  It was working before when I ran it in other browsers.