can asp.net core in linux with out nginx?

mc 5,426 Reputation points
2023-11-07T08:27:26.3266667+00:00

in windows I can click the exe

User's image

and run the web api.User's image

and If I run it in redhat (other desktop linux) can I run it like the command exe?

do not install nginx?

Developer technologies ASP.NET ASP.NET Core
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-11-07T09:54:55.9933333+00:00

    Hi @mc

    If you would like to run the .net core app on the Linux machine you could follow below steps:

    1)Install the .net SDK on the Linux vm

    2)Publish your app from the windows vm from the visual studio that will generate the dll file in the publish folder

    3)Move that published folder on the linux vm

    4)Open the terminal and navigate to the app root folder

    5)Run below command:

    dotnet YourApplication.dll

    Best Regards,

    Jalpa Panchal


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2023-11-07T16:30:25.88+00:00

    Yes, you can run from command line directly, or from systemd.

    ngnix allows multiple sites on the same port, static file caching and other features, but is not required.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.