I get a Not found error when I deploy ASP.NET CORE

2019-06-09 04:01发布

问题:

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.