I'm using Microsoft's owin as a host service for webapi:
The code is as follows:
app. UserWebApi can't be pointed out, and then I found that there is no such method in the interface, and then common sense is written: app. Use(config);
There is a key point in this step, that is, the app. UseWebApi(config) method will prompt that it cannot be found, as shown in the figure below:
Finally, find the error:
"The type 'System.Web.Http.HttpConfiguration' does not match any known middleware pattern."
Solution:
Tourists, if you want to see the hidden content of this post, please Reply
As shown in the following figure: The webAPI interface is successfully accessed.
|