I get a Not found error when I deploy ASP.NET CORE 2.0 WebApi to IIS under Default Website

余生颓废 提交于 2019-12-08 09:27:17

问题


It works well with the label "2" outside of default website but it does run inside the default website


回答1:


Try the following...

Install the hosting bundle again, and then publish from Visual Studio again.

If that doesn’t fix it, go to the publish output folder and run dotnet run <YourWebDll>.DLL




回答2:


I assume you already install either SDK or Runtime in web server.

Then, you need to install ASP.NET Core Module in web server. Here is the download link.

Trouble Shooting

If it still doesn't work, open a command prompt. Navigate to the web application folder and type dotnet YOUR_APP.dll. You should see something like this -

C:\APIs> dotnet YOUR_APP.dll
Hosting environment: Production
Content root path: C:\APIs
Now listening on: http://localhost:5000
Application started: Press Ctrl+C to shut down.

It means your application can run in the web server without IIS. Then you need to trouble shoot in IIS or some other things.



来源:https://stackoverflow.com/questions/50705211/i-get-a-not-found-error-when-i-deploy-asp-net-core-2-0-webapi-to-iis-under-defau

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!