Asked by:
HTTP Error 404.0 - Not Found

Question
-
User-297906461 posted
hi
i created asp.net core 2 api and it is work but when i upload it in IIS10.0 it give me message
HTTP Error 404.0 - Not Found
how can i solve it ?
thanks
Tuesday, November 27, 2018 1:32 PM
All replies
-
User1120430333 posted
HTTP 404 not found means that the WebAPI action method could not be found based on the URL given. Yiu can use Postman free that will help you debug. What web client or HTTP client software are you using to access the WebAPI?
Tuesday, November 27, 2018 2:22 PM -
User753101303 posted
Hi,
You followed something such as https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1 ?
If this is your first deployment you could perhaps enable static file and try with a test.htm page to see if is configured properly. For now technically speaking the incoming url doesn't hit anything that would know how to respond to this resquest.
Tuesday, November 27, 2018 2:28 PM -
User-297906461 posted
i upload it in winhost through filezila and try to access by google chrome
Tuesday, November 27, 2018 2:52 PM -
User475983607 posted
ohoud
i upload it in winhost through filezila and try to access by google chrome
This an ASP.NET Web API or ASP.NET Core Web API?
What exactly did you upload as ASP.NET Core requires a proxy. Does your host provider support ASP.NET Core?
Tuesday, November 27, 2018 3:13 PM -
User-297906461 posted
i upload ASP.NET Core 2 Web API
Tuesday, November 27, 2018 3:16 PM -
User475983607 posted
ohoud
i upload ASP.NET Core 2 Web API
Your response is too vague to guess what you've uploaded. I specifically asked what you uploaded because manually deploying ASP.NET Core requires a few steps extra steps other than simply uploading files. It is not clear if you followed these steps.
Did you read and follow the openly published deployment documentation posted above?
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/?view=aspnetcore-2.1&tabs=aspnetcore2x
Can you explain clearly and accurately how you deployed the ASP.NET Core 2 application? Have you verified your hosting provider supports ASP.NET Core?
Tuesday, November 27, 2018 3:26 PM -
User-297906461 posted
i just create asp.net core 2 api as example without change anything .
and here value controller
[Route("api/[controller]")] public class ValuesController : Controller { // GET api/values [HttpGet] public IEnumerable<string> Get() { return new string[] { "value1", "value2" }; } // GET api/values/5 [HttpGet("{id}")] public string Get(int id) { return "value"; } }
and then i upload its file in filezile
Tuesday, November 27, 2018 3:40 PM -
User475983607 posted
i just create asp.net core 2 api as example without change anything .I asked becasue it you manually deployed the application is
Right, that's the problem. It seems that you made up your own deployment strategy without reading the deployment instructions.
This is the third time we're presenting the link. Please read the instructions.
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/?view=aspnetcore-2.1&tabs=aspnetcore2x
Tuesday, November 27, 2018 3:50 PM