I am trying to host a new ASP.NET 5 WebAPI project in IIS and I am using the ASP.NET 5 RC 1 runtime. The project I am using is the standard generated template for a new ASP.NET 5 WebAPI project. (No code changes.)
I successfully published the project using the command line, and I can get the application to work on the new website using a specific port, such as localhost: 12345. For example, accessing localhost: 12345 / api / values ββreturns values.json data from the project template .
However, when I try to use the IIS application folder for the project, I get error 404. In other words, localhost: 12345 / WebApi1 / api / values ββreturns error 404. But I see that Kestrel is working on a random port in the event viewer. and if I access the data on this port, I return .json values, so I know that Kestrel is working.
Is there anything special that needs to be done to get an ASP.NET 5 WebAPI project running in the IIS application folder under the website?
Note: if I use -server.urls to set the port for Kestrel, it works on both the requested port and the random port registered in the event viewer. (Thus, it is actually accessible from Kestrel from 2 URLs, and not from one configured with -server.urls.)
source share