1Launch Visual Studio
First, open Visual Studio and select ‘Create a New Project’. Search for ‘ASP.NET Core Web App’, select the first option, and click Next.
2 Enter a project name, location and click Next.
3Select ‘.NET 6.0’ as the framework and click Next.
4 A new project will be created. The pages will be templates that can be modified later on to fit your needs.
5 First, let’s confirm that the web application is runnable! Select Debug > Start Debugging. The application, which is currently a blank website with no content, will open in a browser.
6 Next, we will publish this website. Close the browser so that the project will exit debugging mode, and then right-click the project and select Publish.
7 Select ‘Folder’ and click Next.
8 Enter the location where you want the files to extract and click Next.
9 Once it says Ready to publish, click Publish.
10 After publishing, we now have the files ready to be zipped. Click Open folder and you will see all the files you need.
11 Select all the files and send to a compressed (zipped) folder.
12 We’re now ready to upload the files to the web hosting service. Log in to your dashboard and select ‘My Files’.
13 Select ‘Upload and Unzip’.
14 Upload the zip file we created. The site will extract the files to the directory.
15 Once done, you will be redirected back to the file manager. As seen below, all your files have been unzipped to the webhost. To test that the site has been successfully published, click the link on the upper left.
16The project we created should open in a new window.
Congratulations, you’ve just created your .NET 6.0 web application and successfully published it online!