I have a ABP template. It is a merged solution for Angular in Full .Net framework. I have already created a published package by right clicking on the Web.Host project and then Publish.
Here is a screenshot of my published folder:
I have also added a website in my local IIS and have pointed it to the wwwroot folder of my published folder as localhost:8081
I have modified the appconfig.json
in the wwwroot/assets
folder as:
{
"remoteServiceBaseUrl": "http://localhost:8081",
"appBaseUrl": "http://localhost:8081"
}
and have also changed appsettings.json
to
"App": {
"ServerRootAddress": "http://localhost:8081/",
"ClientRootAddress": "http://localhost:8081/",
"CorsOrigins": "http://localhost:8081,http://localhost:8081"
},
localhost:8081
I get "Resource not found" prompt Web.Host.exe
file in the Published folder. When change all above settings to localhost:5000
and execute it, it runs the host on localhost:5000
and works fine for both localhost:5000/swagger
and localhost:5000/app/
Web.Host.exe
? If yes, how would I add such website? Where that port 5000 has been set for the .exe
file?If I change the website physical folder to the published folder (which holds the wwwroot folder) I get the following error (seems something is wrong with the web.config file):
You need the .NET Core Hosting Bundle.
Install the .NET Core Hosting Bundle on the hosting system. ...
a. Navigate to the .NET All Downloads page.
b. Select the latest non-preview .NET Core runtime from the list (.NET Core > Runtime > .NET Core Runtime x.y.z). ...
c. On the .NET Core runtime download page under Windows, select the Hosting Bundle Installer link to download the .NET Core Hosting Bundle....
Restart the system or execute net stop was /y followed by net start w3svc from a command prompt. Restarting IIS picks up a change to the system PATH made by the installer.
Reference: https://learn.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x