Answer the question
In order to leave comments, you need to log in
How to run an empty Web API?
When creating the simplest empty WEB API project. how to run it?
otherwise it gives out:
HTTP Error 403.14 - Forbidden
The web server is configured in such a way that it does not list the contents of the directory.
Answer the question
In order to leave comments, you need to log in
launch, add api/controller/method in the address bar of the browser
In general, for the convenience of testing, use some tool, such as postman - it will be easier to send requests and work with responses
As far as I understand, there is no "default" behavior in your project. You do not have a route for requesting myservice.local (well, for example), so the server tries to find at least something in the root folder - index.htm, default.aspx. Finding nothing, he tries to display the contents of the folder, to which he does not have the appropriate rights. Start small - make sure your api works. If successful, you can try to do something like this for the default behavior - www.asp.net/web-api/overview/getting-started-with -....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question