Cantech.in offers a variety of Windows VPSs that are perfect for hosting .NET Core applications. To deploy your application, you will need to follow these steps:
- Order a new Windows VPS from Cantech.in.
- Log in to your VPS and install the .NET Core Hosting Bundle and SDK.
- Create a new .NET Core application.
- Build your application.
- Publish your application to the IIS server.
- Configure IIS to host your application.
- Test your application.
Step 1: Order a New Windows VPS
To create a new Windows VPS from Cantech.in, visit cantech.in and select the “Windows VPS” option. You will need to choose a plan, a server location, and a term. Once you have made your selections, click the “Order” button.
After you order windows VPS , you will be receive an email of your windows VPS credential .
Step 2: Log in to Your VPS
Once your VPS has been created, you will need to log in to it. You can do this by using the following steps:
- On your local Windows PC, open the Remote Desktop Connection (RDC) client.
- In the “Computer” field, enter the IP address of the remote computer.
- In the “User name” field, enter the username of the account you want to use to log in to the remote computer.
- In the “Password” field, enter the password for the account you entered in the “User name” field.
- Click the “Connect” button.
- If you are prompted to allow the remote computer to connect, click the “Yes” button.
- You will now be logged in to the remote computer.
Step 3:Install the .NET Core runtime hosting bundle :
Ensure that the appropriate version of the .NET Core runtime hosting bundle is installed on your Windows VPS. You can download the runtime from the official .NET website (https://dotnet.microsoft.com/download/dotnet-core).
Step 4: Install the .NET Core SDK
The .NET Core SDK is a set of tools that you will need to build and deploy your .NET Core application. To install the SDK, you can use the following steps:
Open command prompt and fire the following command:
dotnet tool install –global dotnet-sdk
Step 5: Create a New .NET Core Application
Once the .NET Core SDK is installed, you can create a new .NET Core application.
Step 6: Build Your Application
Once you have created your application, you need to build it. To do this, you can use the following steps:
- Open a command prompt on your VPS.
- Change directories to the directory where your application is located.
- Run the following command:
dotnet build
This will build your application and create a directory called “bin”.
Step 7: Publish Your Application to the IIS Server
Once your application is built, you need to publish it to the IIS server. To do this, you can use the following steps:
- Open a command prompt on your VPS.
- Change directories to the directory where your application is located.
- Run the following command:
dotnet publish
This will publish your application to the IIS server.
Step 8: Configure IIS to Host Your Application
Once your application is published, you need to configure IIS to host it. To do this, you can use the following steps:
- Open the IIS Manager.
- Click on the “Sites” folder.
- Right-click on the “Default Web Site” and select “Add Application”.
- In the “Application Name” field, enter the name of your application.
- In the “Physical Path” field, enter the path to the directory where your application is located.
- Click on the “OK” button.
Your application is now hosted on the IIS server. You can test it by opening a web browser and navigating to the IP address of your VPS followed by the name of your application.
I hope this blog has been helpful. If you have any questions, please feel free to leave a comment below.