Hosting an ASPNET project on a LiquidWeb server

Ben 1 Reputation point
2022-05-23T20:25:01.33+00:00

Hello everyone,

I have created a basic ASPNET application and it works just fine locally. I am attempting to publish this to LiquidWeb on a windows server there. I have tried directly publishing through the visual studio IDE, manually creating a folder using dotnet publish and most recently, I created a fully self-contained folder using dotnet publish -r win7-x64.

Publishing manually and with the built in tool and then going to the website both display a runtime error

HTTP Error 500.31 - Failed to load ASP.NET Core runtime
Common solutions to this issue: The specified version of
Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
Troubleshooting steps: Check the system event log for error messages
Enable logging the application process' stdout messages Attach a
debugger to the application process and inspect

Publishing it manually with the fully self-contained command does not. It instead displays the current index.html page and I feel part of that is the pathing here. The fully self contained path is something like website/publish/(Here is the project exe), while the index.html page lives under the website/ portion of the Url. I am looking for tips or tricks or ideas here on how to proceed.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,084 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 43,926 Reputation points
    2022-05-26T07:39:16.387+00:00

    Hi Ben,

    Thank you for posting your question here and we are happy to help you regarding hosting your ASP .Net application.

    Based on the error message you have mentioned above, I believe you are using Dot CORE version. And to deploy any code application, you have to install the "Hosting bundle" provided by Microsoft. This will take care of all required Installable for running your application.

    Please refer following link for additional information and kindly feel free to get back for any additional queries.

    https://learn.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-6.0&tabs=visual-studio

    Install the .NET Core Hosting Bundle on your machine or IIS server where you are trying to host. The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module. The module allows ASP.NET Core apps to run behind IIS.

    https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer

    Run the installer on the IIS server.

    Restart the server or execute net stop was /y followed by net start w3svc in a command shell.

    Besides, here's a document about deploying .NET Core application.

    .NET Core application deployment - https://learn.microsoft.com/en-us/dotnet/core/deploying/

    Hope it could be helpful.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer.--

    0 comments No comments