D
D
Devil Devil2016-08-25 08:18:55
ASP.NET
Devil Devil, 2016-08-25 08:18:55

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

2 answer(s)
D
Dmitry Eremin, 2016-08-25
@EreminD

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

D
Dmitry Kovalsky, 2016-08-25
@dmitryKovalskiy

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 question

Ask a Question

731 491 924 answers to any question