"Asp.net5" cannot be routed to Web API controller controllers

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.