Reputation: 2053
I am having issues with .net core web api deployments on IIS.
I have created the simple web api project using .net core 5. This opens up correctly while running through VS 2019.
I have installed the .net core 5.0.2 hosting bundle on my machine.
Created the application pool with the "No Managed Code" settings.
Published the API using vs folder published and created the IIS site that points to the published folder.
After following all these required steps i am not able to browse through the published APIs using localhost. but it shows some weird errors like HTTP Error 404.0 - Not Found
Upvotes: 1
Views: 965
Reputation: 5235
Please make sure the necessary feature like static content and asp.net feature in turn windows features on or off/add role and feature->internet information service->world wide web service->application development feature->asp.net has been enabled.
In addition, you could try to add runAllManagedModulesForAllRequests="true" attribute to your module section just like:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" >
</modules>
</system.webServer>
Or you could try
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" >
<remove name="UrlRoutingModule"/>
</modules>
</system.webServer>
Upvotes: 0