C# Corner

Related resources for ASP.NET Core 2.0
  • All About Tag Helpers In ASP.NET Core 2.04/11/2018 1:44:00 PM. This article will provide insight about the tag helpers in the terms of what, where and how.
  • ASP.NET Core 2.0 User Role Base Menu Management Using Dependency Injection4/3/2018 12:20:14 AM. In this article we will see in detail how to display role based dynamic menu after user logs in. For this we will create a Menu Master table and insert few records to display the menu and URL to menu
  • File Logging And MS SQL Logging Using Serilog With ASP.NET Core 2.03/22/2018 9:35:21 AM. In this article, you will learn File Logging and MS SQL Logging using Serilog with ASP.NET Core 2.0.
  • All About Pages In ASP.NET Core 2.03/17/2018 11:19:21 AM. This article is about @Page and all the different kinds of pages which come by default with ASP.NET Core 2.0 template.
  • Getting Started With ASP.NET Core 2.0 Identity And Role Management3/17/2018 3:10:48 AM. In this article, we will see in detail how to use ASP.NET Core Identity in MVC Application for creating user roles and displaying the menu depending on user roles.
  • Database Connections In ASP.NET Core 2.03/16/2018 2:19:54 PM. In this blog post we will discuss three ways to define database connections string
  • ASP.NET Core - CRUD Using Angular 5 And Entity Framework Core3/14/2018 10:39:36 AM. CRUD Operations in ASP.NET Core application using Angular 5 , Web API and Entity Framework Core DB first approach with the help of VS 2017.
  • Mapping Similar Objects In ASP.NET Core 2.03/13/2018 10:17:53 AM. This article is about mapping similar objects of two different classes with reduced lines of code using ASP.NET Core Automapper.
  • Authentication Using Twitter In ASP.NET Core 2.03/12/2018 6:17:56 AM. In this article, we are going to look into authentication of ASP.NET Core app using Twitter.
  • Authentication Using Google In ASP.NET Core 2.03/12/2018 6:17:50 AM. In this article, we are going to look into authentication of ASP.NET Core app using a Google account.
  • Dependency Injection In ASP.NET Core 2.03/6/2018 10:18:18 PM. In this article, we will see in detail how to use Dependency Injection in ASP.NET Core 2.0.
  • Authentication Using Facebook In ASP.NET Core 2.03/6/2018 9:25:48 AM. In this article we are going to look into authentication of ASP.NET Core app using a Facebook account.
  • Authentication Using LinkedIn In ASP.NET Core 2.03/4/2018 5:12:35 AM. In this article, we are going to look into authentication of ASP.NET Core app using a LinkedIn account.
  • .NET Core Extented Architecture And Separation Of Concerns2/26/2018 11:25:45 AM. Most of the projects start as small projects and with time they turn into medium or even large projects. By the time that we realize this is happening, it might be too late and can cost us a lot to ch
  • ASP.NET Core 2.0 Project Structure And A Few Important Folders/ Files2/26/2018 10:14:28 AM. Despite having been widely accepted as a development platform, ASP.Net was facing a big challenge in that it is only made for Windows servers and can only be executed on IIS.
  • All About Appsettings.json In ASP.NET Core 2.02/19/2018 4:31:39 PM. This article talks about the use of maintaining multiple configuration files for a single solution file and how to do this.
  • Publish ASP.NET Core 2.0 Application On Azure With SQL Services2/15/2018 2:54:26 PM. In this article, we will learn how to deploy or publish an Asp.Net Core 2.0 application on Azure.
  • Getting Started With Razor Pages In ASP.NET Core 2.02/11/2018 11:10:20 AM. Today, we will talk about more about Razor pages - what actually a Razor page is, how to create Razor page applications, and some of the fundamentals of Razor pages.
  • Cookie Authentication With ASP.NET Core 2.02/7/2018 4:31:12 PM. Authentication is an integral part of web security. ASP.NET Core provides multiple ways to implement authentication in a web application. We will be looking into on such technique - Cookie authenticat
  • ASP.NET Core 2.0 Identity1/31/2018 11:05:20 AM. In a previous post, I showed how to use cookie authentication middleware to protect your web application. ASP.NET Core also provides a richer set of services, called Identity, to work with user authen
  • Publish ASP.NET Core 2.0 Application on IIS1/28/2018 11:16:56 AM. This article will teach you how you can deploy or host your Asp.Net Core 2.0 web application on IIS.
  • Versioning ASP.NET Core 2.0 Web API - Part One1/25/2018 12:07:40 PM. In this article series, we are going to explore REST API versioning best practices. At the end of the article series you will be able to pick the best solution for your project needs.
  • ASP.NET Core 2.0 - Implementing A Third Party Web API1/22/2018 2:42:06 PM. A common task for a developer when working with or building an application is implementing and interacting with APIs. In this post we will look at what an API is. We will then move onto creating our o
  • Top 10 New Features Of ASP.NET Core 2.01/22/2018 1:33:20 PM. .NET is now .NET Core and known as cross-platform and open source platform where you can build your all types of applications. An application could be a web app, desktop app, mobile app or gaming app.
  • ASP.NET Core 2.0 - Applying Bootstrap Template1/18/2018 12:09:41 PM. This article walks you through the steps for creating an ASP.NET Core 2.0 Web Application using Bootstrap as the template for layout.
  • Deploying ASP.NET Core 2.0 App To Azure Using Docker1/18/2018 12:08:04 PM. Azure provides a highly scalable, configurable and easy to use Platform-as-a-Service (PaaS) environment for our ASP.NET Core web applications. Azure Web App is one of the simplest ways to host web app
  • Deploy Your First ASP.NET Core 2.0 App In Azure Managed Kubernetes1/17/2018 5:01:43 PM. This guide will help you to get started with AKS. We are going to deploy our first ASP.NET Core 2.0 App in AKS and then do some cool stuff like scaling up and down.
  • Custom Model Binding In ASP.NET Core 2.01/17/2018 3:53:30 PM. In an earlier post I discussed how to prevent insecure object references by encrypting the internal references (e.g. table primary keys) using Data Protection API. To avoid duplication of code that en
  • Identity Server 4 With ASP.NET Core 2.01/17/2018 1:09:01 PM. OAuth 2 provides several flows or grant types for various use cases. I personally group them into two categories; flows that require user interaction with authorization server and flows that don’t.
  • Create Your First ASP.NET Core 2.0 Service Fabric Container Application In Windows1/16/2018 6:19:01 PM. Learn how to create your first ASP.NET Core 2.0 Service Fabric Container application in Windows.
  • Using CSP Header In ASP.NET Core 2.01/15/2018 5:57:45 PM. Content Security Policy (CSP) is an additional level of security that could help prevent Cross Site Scripting (XSS) attacks. In these attacks malicious scripts are executed on user’s browser since bro
  • ASP.NET Core 2.0 - How To Use Dependency Injection1/15/2018 4:22:56 PM. In this article, I'll show you the new feature introduced in ASP .NET Core that allows you to inject dependencies directly into a View using the dependency injection container.
  • Deploying ASP.NET Core 2.0 MVC Application To Microsoft Azure Web App Using Bitbucket1/15/2018 12:58:51 AM. In this video will see how to deploy an ASP.NET Core 2.0 MVC web application to Azure Web App using Bitbucket.
  • Preventing CSRF Attacks In ASP.NET Core 2.01/12/2018 12:05:49 PM. OWASP 2013 classifies Cross Site Request Forgery (CSRF) as one of the Top 10 risks and is present if attacker can force the victim's browser to send forged request to your web application and it c
  • ASP.NET Core 2.0 Status Code Pages1/11/2018 6:33:54 PM. Exception handling middleware (as discussed here) will catch unhandled exceptions however if you want to display error pages for individual HTTP status codes then framework provides another middleware
  • Preventing Insecure Object References In ASP.NET Core 2.01/10/2018 11:09:45 PM. How to prevent insecure direct object reference in ASP.NET Core.
  • Preventing Redirect Attacks In ASP.NET Core 2.01/10/2018 11:07:32 AM. When your controllers redirect to another location based on user input (e.g. via query string), it is important to ensure that the location is not malicious and prevent open redirect attacks. The simp
  • Hashing In ASP.NET Core 2.01/9/2018 10:41:29 AM. The new Data Protection API in .NET Core includes functionality to create hashes using PBKDF2algorithm. ASP.NET Core uses this behind the scenes in PasswordHasher class, which is used in ASP.NET Core
  • Using HTTPS In ASP.NET Core 2.01/5/2018 12:34:28 PM. Create an empty project and update Startup to add services and middleware for MVC, including the filter for HTTPS.
  • CORS In ASP.NET Core 2.01/4/2018 12:44:30 PM. To allow clients from a different origin to access your ASP.NET Core Web API, you’ll need to allow Cross-Origin Requests (CORS). Here same origin means clients who have identical schemes, hosts and po
  • ASP.NET Core 2.0 Authorization1/4/2018 11:36:26 AM. Authorization is about deciding permissions users have and resources they can access. In ASP.NET Core this is achieved by first assigning claims to the user and then based on those claims defining pol
  • Exploring ASP.NET Core 2.0 And Docker On MacOS1/4/2018 11:11:08 AM. Last year, I wrote an article about “.NET Core On Mac - Building An ASP.NET Core App With Web API, EF, PostgreSQL And Running It On Docker”. The article was using .NET Core 1.1 version and If you’ve b
  • ASP.NET Core 2.0 Bearer Authentication1/2/2018 7:08:47 PM. Bearer Tokens (or just Tokens) are commonly used to authenticate Web APIs because they are framework independent, unlike something like Cookie Authentication that is tightly coupled with ASP.NET Core
  • ASP.NET Core 2.0 Cookie Authentication1/2/2018 10:29:58 AM. Cookie Authentication allows developers to hook into events at various lifecycle stages of the authentication process. For instance you could log successful sign-ins using OnSignedIn or use OnValidate
  • Consuming ASP.NET Core 2.0 Web API Using HttpClient12/27/2017 2:03:37 PM. We’ll create a library to wrap the functionality of HttpClient. I’ll use builder pattern for this purpose. Add a class with methods for storing parts of HttpClient.
  • Asynchronous Messaging Using ASP.NET Core 2.0 Web API12/21/2017 10:36:41 AM. How to implement asynchronous messaging using ASP.NET Core Web API. Create an empty project and update the Startup class to add services and middleware for MVC.
  • Documenting ASP.NET Core 2.0 Web API12/20/2017 11:47:26 AM. Documents generated by Swagger can include XML documentation.
  • Formatters In ASP.NET Core 2.0 Web API12/19/2017 10:35:37 PM. Let us learn about formatters used in ASP.NET Core 2.0 Web API.
  • ASP.NET Core 2.0 Tag Helper Component12/18/2017 1:13:03 PM. In case you’re wondering if the solution above is missing a Tag Helper for head HTML element, it’s not. ASP.NET Core team has provided us with two built-in Tag Helpers, one targets head and the other
  • Handling Concurrency In ASP.NET Core 2.0 Web API12/15/2017 5:54:00 PM. We add a magic value to the response based on data we hold at the time. Usually ETag header is added for this purpose containing hashed value based on data/body of response.
  • Overview Of Identity In ASP.NET Core 2.012/15/2017 5:36:48 PM. It is a membership system that allows us to add login functionality to our application. User may create account and login using credential or can use external login provider such as Google, Microsoft
  • ASP.NET Core 2.0 Web API AND HATEOAS12/14/2017 12:34:34 PM. The idea behind HATEOAS (Hypermedia As The Engine Of Application State) is to transfer links in the resource representations. The sample demonstrates how links can be provided for a collection and ind
  • Versioning ASP.NET Core 2.0 Web API12/13/2017 8:17:38 PM. As your Web API changes, you would need to add versioning support in order for clients to continue working correctly. Adding versioning support in ASP.NET Core involves first configuring services in S
  • Sorting In ASP.NET Core 2.0 Web API12/12/2017 11:13:04 PM. Sorting information is usually received via query parameters. The POCO SortingParams simply hold this information and passes to service (or repository).
  • Paging In ASP.NET Core 2.0 Web API12/11/2017 4:17:18 PM. Paging information; i.e., page number and page size, is usually received via query parameters. The POCO PagingParams simply holds this information and passes it to service (or repository).
  • Filtering In ASP.NET Core 2.0 Web API12/10/2017 11:31:52 PM. Filtering information is usually received via query parameters. The POCO FilteringParamssimply hold this information and passes to service (or repository).
  • Security In ASP.NET Core 2.012/1/2017 12:14:08 PM. Securing your web applications with ASP.NET Core 2.0
  • Angular 5 App With ASP.NET Core 2.0 Web API11/26/2017 4:15:47 AM. Today, we will see one of the simplest ways to create an Angular 5 app & how to integrate it with ASP.NET Core 2.0 Web API. So, let’s start by having a look at what are the steps involved in creat
  • ASP.NET Core 2.0 Secret Manager11/22/2017 6:07:12 PM. I discussed in the previous post how configuration settings can be stored in configuration files. However, these files are checked in the source control and not suitable to store confidential settings
  • Creating CRUD API In ASP.NET Core 2.011/17/2017 7:19:51 PM. ASP.NET Core gives a unified mechanism for creating MVC and Web API application. The key difference is that Web API will return JSON (or XML) and HTTP status codes instead of views, in order to commun
  • ASP.NET Core 2.0 Razor Pages11/16/2017 4:29:54 PM. Razor Pages are introduced in ASP.NET Core 2.0 to make building simple web applications quicker and is a good way to play with various ASP.NET Core concepts like Razor, Layout Pages and Tag Helpers et
  • Passing Parameters To Middleware In ASP.NET Core 2.011/15/2017 10:43:51 AM. I discussed in an earlier post that it is good practice to define middleware in a separate class and add to the pipeline using extension methods. We may also need to pass information to our middleware
  • Azure Table Storage In ASP.NET Core 2.011/14/2017 6:15:47 PM. Add a class to encapsulate storage access. Add a private helper method to access storage
  • ASP.NET Core 2.0 MVC Filters11/13/2017 2:06:45 PM. Filter runs after an action method has been selected to execute. MVC provides built-in filters for things like authorization and caching. Custom filters are very useful to encapsulate reusable code th
  • Upload/ Download Files In ASP.NET Core 2.011/10/2017 1:06:12 PM. ASP.NET Core MVC model binding provides IFormFile interface to upload one or more files. The HTML form must have encoding type set to multipart/form-data and an input element with type attribute set t
  • ASP.NET Core 2.0 MVC Distributed Cache Tag Helper11/9/2017 12:56:40 PM. Cache and Distributed Cache Tag Helper help improve performance of your application by caching view’s content, either in-memory or in a distributed cache (e.g. Redis). Distributed Cache Tag Helper use
  • ASP.NET Core 2.0 MVC Custom Tag Helpers11/8/2017 10:54:33 AM. As discussed in the previous post, Tag Helpers help generate HTML by attaching attributes to existing HTML elements or by creating new elements. In this post we’ve created a new tag to display employe
  • ASP.NET Core 2.0 MVC Tag Helpers11/7/2017 10:40:15 AM. Tag Helpers help generate HTML by attaching attributes to existing HTML elements or by creating new elements. Although they look like HTML elements and attributes, Tag Helpers are processed by Razor (
  • ASP.NET Core 2.0 MVC Areas11/6/2017 3:39:35 PM. Razor pages inside Areas folder can use the Layout page located outside it (e.g. in /Views/Shared folder). You can define a separate Layout page for each Area too. Yet another approach is to define a
  • ASP.NET Core 2.0 MVC View Components11/6/2017 11:28:07 AM. View Components are special types of views that are rendered inside other views. They are useful for reusing parts of a view or splitting a large view into smaller components.
  • How To Create To-Do CRUD Operation With ASP.NET MVC Core, Angular 4.011/4/2017 12:10:12 AM. We want to create below single page application with CRUD operation, Add, Update and Remove functionality with in-memory TodoRepository Database.
  • ASP.NET Core 2.0 MVC Partial Views11/3/2017 12:41:48 PM. Partial views are special type of views that are rendered inside other views. They are useful for reusing parts of a view or splitting a large view into smaller components.
  • ASP.NET Core 2.0 MVC Dependency Injection In Views11/2/2017 8:31:09 PM. In ASP.NET Core dependency injection is not limited to middleware, controllers and models etc. Views can also benefit from the services configured in the service container.
  • ASP.NET Core 2.0 MVC Layout Pages11/2/2017 11:11:32 AM. Layout page is added to the Views/Shared folder and is named (as a convention) _Layout.cshtml. There can be more than one layout pages in your application too.
  • ASP.NET Core 2.0 MVC Razor10/31/2017 6:03:46 PM. ASP.NET Core MVC middleware will find and execute the Razor template (.cshtml file) when the Controller returns ViewResult. Razor templates use syntax that combine C# and HTML to produce the final HTM
  • ASP.NET Core 2.0 MVC Model Binding10/30/2017 11:43:15 AM. In a previous post on Routing, I showed how MVC maps URLs to Controller and actions to execute. We touched on the topic of the model binding mechanism through which MVC binds routing template tokens t
  • Running ASP.NET Core 2.0 Via Mono10/30/2017 11:15:05 AM. In this article, you will learn how to run your ASP.NET Core 2.0 project via Mono . Most of time , we will use .NET Core CLI to run our ASP.NET Core web application , such as dotnet run and dotnet xxx
  • Logging Framework In ASP.NET Core 2.010/29/2017 2:48:28 PM. Logging is a very critical and essential part of any software. It helps us in the investigation of the essence of problems. Before ASP.NET Core, we had to use third party libraries for logging our app
  • ASP.NET Core 2.0 MVC [Remote] Validation10/27/2017 11:33:51 AM. In this article, you will learn about ASP.NET Core 2.0 MVC [Remote] Validation.
  • Azure Cache In ASP.NET Core 2.010/25/2017 3:46:01 PM. In this article, you will learn about Azure Cache in ASP.NET Core 2.0.
  • ASP.NET Core 2.0 MVC Routing10/23/2017 10:49:32 AM. Routing in ASP.NET Core MVC is the mechanism through which incoming requests are mapped to controllers and their actions. This is achieved by adding Routing middleware to the pipeline and using IRoute
  • ASP.NET Core 2.0 Response Compression10/16/2017 10:15:48 AM. When you’re unable to use the compression features of web servers (IIS, Apache, Nginx), ASP.NET Core provides an alternate option, Response Compression middleware. It’s performance won’t match server
  • ASP.NET Core 2.0 Response Caching10/13/2017 10:52:52 AM. As you navigate between a controller with caching enabled (Home) and another one without it (Movies), you’ll notice that time isn’t been updated i.e. it's not coming from server but rather from c
  • ASP.NET Core 2.0 URL Rewriting10/11/2017 1:00:55 PM. URL Rewriting is about modifying the request URL based on custom rules in order to decouple the address from the underlying resource. This could be for reasons like security, SEO, user friendly URL an
  • ASP.NET Core 2.0 File Providers10/11/2017 12:47:45 PM. ASP.NET Core provides an encapsulation of System.IO.File type in order to limit the access to file systems via PhysicalFileProvider type, which is an implementation of IFileProvider.
  • ASP.NET Core 2.0 Session State10/9/2017 5:11:56 PM. Using an empty project from a previous post, amend Startup class ConfigureServicee() method, and add services for session and its backing store.
  • Azure Blob Storage In ASP.NET Core 2.010/6/2017 1:05:51 PM. In this article you will learn how to use Azure Blob storage in ASP.NET Core.
  • ASP.NET Core 2.0 Structured Logging10/5/2017 12:18:12 PM. This article is about how to work with structured logging in ASP.NET Core and Serilog
  • Getting Started With ASP.NET Core MVC Apps Using VS Code10/5/2017 11:46:49 AM. In this article, we will discuss how we can create a HelloWorld app with ASP.NET Core 2.0 using Visual Studio Code. We will learn how to create an ASP.NET Core MVC application, how to create new Contr
  • ASP.NET Core 2.0 Uses SignalR Technology10/3/2017 2:08:31 AM. I am using the current highest version in this example, of course the version number is likely to change every day, the latest version of the SignalR is not compatible with the .NET Core SDK 2.0 Previ
  • What's New In ASP.NET Core 2.09/30/2017 12:09:07 PM. Learn What's New in ASP.NET Core 2.0
  • ASP.NET Core 2.0 Error Pages9/29/2017 11:48:09 AM. Starting from an empty project, created in a previous post, amend the Configure() method of Startup class to use middleware needed for error handling. Below I’ve used a custom middleware (defined as l
  • CRUD Operation With Razor Pages In ASP.NET Core 2.09/27/2017 12:16:07 PM. In this article, we are going to learn how to perform CRUD operations with Razor Pages in ASP.NET CORE 2.0
  • Azure NoSQL In ASP.NET Core 2.09/26/2017 10:48:43 AM. The sample code will require you to set up an Azure account, NoSQL database and collection.
  • How To Write Simple Todo CRUD ASP.NET MVC Application9/22/2017 1:11:00 PM. This article includes a lab exercise for you to demonstrate what have you learned from this training material to create your own Employee CRUD operation using EmployeeRepository
  • Enabling Swagger in ASP.NET Core 2.0 RESTful Web APIs using Swashbuckle9/19/2017 1:41:48 AM. This video shows how to enable Swagger UI in ASP.NET Core 2.0 RESTful Web APIs using Swashbuckle.
  • How to Change Bootstrap Theme for ASP.NET Core 2.0 MVC Web Application9/16/2017 3:29:41 AM. In this video will have quick look on how to change Bootstrap Theme for ASP.NET Core 2.0 MVC Web Applications.
  • ASP.NET Core 2.0 Static Files9/13/2017 12:49:15 PM. Static files can also be served from folders outside wwwroot by passing in StaticFileOptions to middleware and setting a FileProvider and RequestPath. This is useful when you want authorised access to
  • ASP.NET Core 2.0 Environments9/12/2017 11:51:00 AM. Starting from an empty project, discussed in a previous post, modify the Configure() method to use the IHostingEnvironment to call different middleware based on current environment.
  • ASP.NET Core 2.0 Configuration9/11/2017 3:31:33 PM. ASP.NET Core has a simple mechanism to read application settings from various sources like JSON files, Environment variables or even custom data sources. It is also simple to use the settings, thanks
C# Language Specification 5.0
This book provides a complete description of the C# language 5.0.
Download