ASP.NET Core runs on conventions. It expects Startup.cs file for starting up the ASP.NET Core application and wwwroot
folder for the application’s static contents. But what if you want to change the name of Startup.cs
and wwwroot
to your choice? Well, that can be done. In this short post, we will see how to change Startup.cs and wwwroot folder name in ASP.NET Core.
Read More
New ASP.NET Core Project Templates to play with
There are some new ASP.NET Core project templates released to play with. Using these templates you can create a MVC starter application, a static website application template and Vue.js with WebPack. At this point of time, it’s not clear whether they are going to be part of official ASP.NET Core templates. To use them, you need to download a VSIX extension Read More
Integrate HangFire With ASP.NET Core WEB API
HangFire is an easy way to perform background processing in .NET and .NET Core applications. There isn’t any need to have a separate windows service or any separate process. Hangfire supports all kinds of background tasks β short-running and long-running, CPU intensive and I/O intensive, one shot and recurrent. You donβt need to reinvent the wheel β it is ready to use. In this post, we will see how to integrate HangFire with ASP.NET Core WEB API. Read More
Fix for “missing xml comment for publicly visible type or member” in ASP.NET Core
This warning cs1591 missing xml comment for publicly visible type or member, you may get while building the application or Visual studio will also display red squiggle in your code at all places where XML comments are missing. The warning can be ignored, but that red squiggle in code is quite annoying. So in this short post, find out how to fix/disable this warning cs1591 in ASP.NET Core projects.
Read More
The most productive way to handle exception in ASP.NET Core
A few days ago, a tweet from Marcos Besteiro got my attention. He tweeted, “Most productive exception handler ever”. Here is the actual tweet.
Most productive exception handler ever pic.twitter.com/ymDoKVcQo5
— Marcos Besteiro π§π»πΆπ» (@MarcosBL) May 6, 2016
It’s indeed the most productive exception handling idea that I came across. This is what we as developers do most of the times when there is an exception. We simply copy and paste the exception on Google/Bing and got the answers on StackOverflow. And this idea will definitely save the efforts of copy-paste and then searching for help. As earlier, I posted about Global Exception Handling in ASP.NET Core WEB API and thought of implementing the same idea with ASP.NET Core.
Global Exception Handling in ASP.NET Core WEB API
Exception handling is one of the most important part of any application that needs to addressed and implemented properly. With ASP.NET Core, things have changed and are in better shape to implement exception handling. Implementing exception handling for every action method in API, is quite time-consuming and requires extra efforts. So in this post, find out how to implement global exception handling in ASP.NET Core WEB API. Read More
How to bind Click event in Angular 2
In this short post, find out how to bind click event in Angular 2. ngClick
is used in Angular 1.x to bind the click event but things changed in Angular 2. One of the major change in Angular 2 is, that it directly uses the valid HTML DOM element properties and events. So take the HTML event and wrap it with parentheses. So with Angular 2, use (click)
to attach a click event in Angular 2. Read difference between Angular 1.x and Angular 2 to know more about other differences. Read More