Posts

Displaying A Start Page In ASP.NET Core 3.1 Web API Project.

Displaying A Start Page in ASP.NET Core 3.1 Web API project. When we create a Web API project using Visual Studio 2019 Template there is no file to display when the web application start. That is because Web API doesn't need to display any information to the user or the public. But some times we may need to add a little bit of information to the site, or even during the development stage we may need to show some information. Add app.UseDefaultFiles(); app.UseStaticFiles(); to the Configure method in the Startup.cs file. Then Add a Folder and name it as wwwroot . This is is very important. Then add the Index.html file inside wwwroot folder. Now we can edit the index.html file to add any information. That's it.

Getting Started With Web Application Using ASP.NET Core 3.1 - Step By Step Instructions

Image
Getting Started With Web Application Using ASP.NET Core 3.1 - Step By Step Instructions There are a few step-by-step tutorials and blogs on the internet about creating ASP.NET Core 1.0 to ASP.NET Core 2.2. At the time of this writing, I couldn't find any complete guide for developing Web applications using ASP.NET 3.1. There were a couple of tutorials there but all of them are discussing 2.2 features and the history. Therefore, I thought of writing this tutorial as an updated edition of two of my previous blogs, Step By Step Guide For Creating ASP.NET Core 2.2 C# Web Application Using Visual Studio 2017 and Getting Started With Web Application Using ASP.NET Core 2.2 With Visual Studio 2017 .  This blog is for demonstrating some basic steps to create a web application using ASP.NET Core 3.1 and then taking a closer look at the project items together with how the web app builds the WebHost for the application. To follow this blog it is required to have the following: Basic k...

Creating Visual Studio Custom Templates for ASP.NET Core Razor Pages

Image
Create Visual Studio Custom Project Templates for ASP.NET Core Razor Pages Web Application Traditionally Visual Studio comes with several default templates. There are two types of templates: Project templates, and item templates. Using those templates we build more complete projects for our own business use. Sometimes we want to create more specific types of templates. For example, if we have a customized project and we want to use it to create projects more often, Visual Studio provides a way to store them as a template and reuse them when creating a project.  Apart from this now with the new Dotnet core, there is a new set of templates available for Visual Studio. .Net core templates can be used either by Visual Studio  & Visual Studio for Mac or the dotnet command line (dot net new). Dotnet core templates are introduced in Visual Studio 2017. Here I am documenting how to create custom .core web app project templates for VS2017.  DotNet Core Web App Project Template...

Getting Started With Web Application Using ASP.NET Core 2.2 With Visual Studio 2017

Image
Getting Started With Web Application Using ASP.NET Core 2.2 With Visual Studio 2017 To follow this guide it is required to have the following: Basic knowledge of C# programming and understanding of  HTML, CSS & JavaScript Web technologies.  Visual Studio 2017 (Community or any commercial edition) is installed on the development computer. SQL Express is also required and comes with the Visual Studio installer. Remember to install it as well. Follow the  Step By Step Guide For Creating  ASP.NET Core 2.2 C# Web Application Using Visual Studio 2017 The completed web application project using the above tutorial builds a website as shown below.  Figure 1: Final Website Here I am going to discuss some useful information about the application we created.   Step1. Closer Look At The Project The project we created using  ASP.NET Razor Web Page Application  is added to the solution, as shown in the Solution explorer, where it displays the folder str...