This title does not know the appropriate inappropriate, the specific problem is that I created a web API Controller Class on an existing project, but press F5 to start debugging, through the given path such as "http://localhost:3753/api/ VALUES/5"When accessing the Get (int id) method, there is no response, and setting breakpoints is not going in."
However, the problem did not find a solution on the web, so a new ASP. NET Web Application type project was created, and then a web API Controller Class was added ,
Reference: "Asp.net5" Web API Controller class Learning
See if the corresponding path is in effect and the result is effective!
What is the reason, because the online Chinese information is relatively small, can only bite the bullet to watch the official documents;
It is important to find a Setup.cs file, and to understand the concept and function of route in some MVC structures,
Haha, there really is this thing, so decisive copy come over, Dizzy, out of the abnormal!
How to solve it? For details, please refer to:
InvalidOperationException was unhandled by user code (an unhandled invalid operation exception exists in user codes )
========================= Divider Line ====================================
"You are not underappreciated, you are not enough" in should sharpen the time not to rush to firewood, this will hurt the knife, hurt the hand, in the road should be hard, do not rush to see the results. Time is long, you have to heart, rational to find a suitable road, may begin this road will be full of hardships, but the most beautiful flowers are always in the harshest environment.
"Asp.net5" cannot be routed to Web API controller controllers