What is the URL? Are you sure you are accessing the correct site and not the default site?
Maybe you created the site under the default site?
http://localhost/appname/api/values
Or maybe the site you created is under a different port?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
For a new project I would like to use the new .Net 6.0 framework for the web api.
I have build the first piece and it run well on the IIS Express and running from command line on my developer machine.
When I try to publish it on IIS I receive the error "404 not found" when try to call any app url.
I recieve this error also if I use IIS on my Windows 10 developing machine.
The step:
I have installed the "Hosting Bundle for 6.0.1"
I have created the AppPool without managed code (also tried with managed code)
I have published on a folder the .Net 6.0 Web Api App, moved the publish folder on the server
How I can chek if the server enviromet is correctly configured for hosting .Net 6.0 apps? There is an utility to do that check?
Thanks for any help
Lorenzo
What is the URL? Are you sure you are accessing the correct site and not the default site?
Maybe you created the site under the default site?
http://localhost/appname/api/values
Or maybe the site you created is under a different port?
Hi and thanks,
the api apps is published in the root of a specific (not default) web site.
The url is https://api-test.domain.it
If I put a index.html on the root folder and DELETE the .NET 6.0 web api file all work fine
If I do not delete the .Net 6.0 web api file also the index.html file is not found (Error 404)
I do not have any info in the event viewer of the machine
Lorenzo
A 404 is expected unless you have a default route for https://api-test.domain.it or configured swagger as the default.
If I do not delete the .Net 6.0 web api file also the index.html file is not found (Error 404)
ASP.NET Core applications use a static file handler for returning static files. The files are located in the wwwroot folder. Add a wwwroot folder to the root of the Web API project and add the static file listener to the application configuration if you want to return static files as a test.