Good day all. This time I have planned to publish .NET 6.0 and Angular series of articles. In this series, I have planned to publish articles like
- Easy to learn .NET 6.0 and Angular - Getting Started Angular Template – Part 1
- Easy to learn .NET 6.0 and Angular - Getting Started Angular Standalone Template – Part 2
- Easy to learn .NET 6.0 and Angular - Getting Started Admin LTE Design – Part 3
- Easy to learn .NET 6.0 and Angular - Getting Started Multi Language – Part 4
- Easy to learn .NET 6.0 and Angular - Getting Started Publish to IIS – Part 5
- Easy to learn .NET 6.0 and Angular - Getting Started WEB API – Part 6
- Easy to learn .NET 6.0 and Angular - Getting Started WEB API CRUD SQL SERVER – Part 7
In this article, we will see in detail how to get started with the .NET 6.0 and Standalone Angular Template with WEB API and Publishing both WEB API and Angular projects to the IIS(Internet Information Service).
This is series of articles and in my previous article, I have explained in detailed on getting started with .NET 6.0 and Standalone Angular Template. In this article, let's see the steps to publish our .NET 6.0 Stand Alone Template project and WEB API to IIS.
(WWW) -> What, Why and When we need IIS
What is IIS: IIS is called as the Internet Information Service, which is a Web Server that runs under the Windows Operating System and was introduced and created by Microsoft.
Why and When IIS: The main purpose of developing any web application is to store it in Web Server and view/access from anywhere on the globe via Internet. No matter if you stay at home, office or traveling if you have the access to internet then you can view and access your developed web application from Web Server.

Microsoft has developed the Internet Information Service which act as a WEB Server in Windows Operating System.
Let’s consider as our office is in same LAN (Local Area Network) and if we publish our ASP.NET Core Angular Application in IIS in our office server PC or in our local computer. Then within our office LAN network we can view Web application from any computer, Notebook, Tablet or in Mobile which is in same WIFI and in same LAN network.

The above image shows as I have published my demo .NET 6.0 WEB API and Angular Stand-Alone project to IIS. My Tablet, Notebook and Mobile phone is using the same WIFI connection and using the IIS PC IPADDRESS we can view our website from Mobile, Tablet and Tablet. But here my website is only accessible within the local AREA Network and if we want to access our website anywhere even outside our office then we can configure the global IP to our PC and then we can view our website anywhere.
The best way is as we need to have a WEB Server which we call it as Production Server and we can publish our web site in Production server and make the Server to access globally. We can also publish our Web Site in Cloud Server like Azure, AWS and etc.
Secure your website
As you can see if we publish our website in local IIS, Production IIS Web Server or in Cloud Server any one can access the website from LAN or from WAN (Wide Area Network) Internet. If anyone know our hosted pc IP Address, Port no or is aware about domine name then we need to secure our website.
If our website has non important data like only information which can be open to all means then we can make simple website and made accessible to all. If we want to secure our data and if we and only particular user want to see certain page and data means then for that website, we will add the features like Login, Authentication (Check the user is valid or not to Login), Authorization (Check the logged in user has the permission to access the page and data). Session to make multiple user login and trace and track each session user activities on our website.
We can consider the Shopping cart websites which initially open to all the users as anyone can view all the products and details. But if they want to do online shopping then they need to login and view their shopping lists and made new shopping. In the shopping site we use login for the users by Authentication and Authorization to made access and able to view only the logged in users shopping list and the session is maintained for all the users individually to view only their shopping product listing details.
Bootstrap Website
Hope you all aware about the word Bootstrap as we design and develop our web applications using Bootstrap which is a responsive CSS framework used to develop our application faster and the web application can be viewed in any resolution so we can view our web application in Mobile, Tablet, Notebook, any computer and PDP’s. Our ASP.NET Core and Angular Templates are by default the Bootstrap added we can use it and design our website. Our previous article which explained about .NET 6.0 and Angular using Admin LTE Design which is also designed using Bootstrap so our web application can be viewed in Mobile, Tablets, Computers and in PDP’s.
Installing IIS
First Check whether IIS is installed on your computer or not to check that open browser and type localhost. If you see the page like this means then the IIS is already installed on your local computer.

If the localhost is not displayed means then check and install the IIS to your computer.
Click Start > Enter Add or remove Programs > Click on Programs and Features

Click Turn Windows Features on or off

Select the Internet Information Service and Click OK.

Install and open in in Start > Enter IIS > Open the Internet Information Service.

Now we are ready to publish our .NET 6.0 and Angular Application
Prerequisites
- Visual Studio 2022
- Node.js – If you don’t have Node.js install Node.js (Download link).
- Angular CLI (Download link).
- .NET Core Hosting Bundle (Download link).
Note: In order to host our ASP.NET Core in IIS we must install the .NET Core Hosting Bundle. Kindly install it before hosting your ASP.NET Core applications to the IIS.
Code part
After installing all the prerequisites listed above and click Start >> Programs >> Visual Studio 2022 >> Visual Studio 2022 on your desktop. Click New >> Project.

Search for Angular and Select Standalone Typescript Angular project and click Next.

























Tomas OpisPosted Jul 17, 2022, 2:33 PM
Hello, which advantages has .NET Core + Angular over .NET Core + Blazor ? It seems to me, that you will save lot of time and money, if you choose Blazor. You dont need to implement validation in both technologies, you dont need to create dto object twice and you have one technology stack.