Easy Way to Restart Your ASP.NET Core Apps Progamatically

We developers won’t have access to servers all the time, and without management capabilities, it will be difficut to restart a web application. However, in ASP.NET Core, there is a way for us to programmatically restart our application without requring management capabilities from server admins. IApplicationLifetime There is a IApplicationLifetime interface in ASP.NET Core which can handle […]

Read more
5 Ways to Redirect Request ASP.NET Core

In ASP.NET Core applications it is possible to redirect to a specific URL in several different ways. In this article, we will learn about these techniques and the code required to redirect a request in ASP.NET Core There will always be a need for redirection to another URL based on some conditions like redirecting a […]

Read more
How to Make Your ASP.NET Application Pool Keep Alive

Somehow what you need is to have IIS keep website alive. You need to keep your ASP.NET website and application pool always running. Regardless of application pool, website, IIS web server, or the entire server restarting. Perhaps the main reasons could be that you need to initialize some code at the global asax at application start up. To fire […]

Read more
How to Send Email Using Gmail in ASP.NET Core

In previous post, I have explained how to send email using Mailkit in ASP.NET Core. In this post, I will explain about how to send email using Gmail in ASP.NET. The .NET framework has built-in namespace for handling email settings, which is System.Net.Mail namespace. In the following example, I’ll use two classes from the System.Net.Mail namespace: For email settings, […]

Read more
How to Use ILogger in .NET Applications to Trace Logging Output

.NET’s greatest strength is its long history of supporting developers through each industry paradigm shift, but just because there’s a new way of doing things doesn’t mean the established method goes away. It’s also a source of confusion and frustration for many. Developers spend time trying to merge the past with the present while also […]

Read more
How to Solve Refresh Tokens in ASP.NET Core Web Api

One thing that comes to mind when using access tokens to secure a web api is what do you do when the token expires? Do you ask the user for credentials again? That’s not really a good option. This blog post is about using refresh tokens to solve this problem. Specifically in ASP.NET Core Web […]

Read more
The Difference Between Middleware and Filters Power in ASP.NET Core

In ASP.NET core, Middleware and Filters are two concepts which are very useful & powerful but often confuses also on which one to choose. Middleware and Filters serves similar purpose and both can be used to achieve the common tasks like exception handling, localizations, authentications etc… but both has certain difference in a way it […]

Read more
How to Build Web Application Using Blazor

This tutorial introduces the Blazor framework by guiding you in building a simple Web application with C#. What Is Blazor? Blazor has been gaining in popularity, especially after the release of .NET Core 3.0, which enriched it with many interesting features. Subsequent versions of .NET consolidated its foundations, and the interest around it is growing so […]

Read more
7 Tips to Speed Up Your ASP.NET Hosting Website on ASPHostPortal

We know that many factors can impact to your ASP.NET website speed. This includes tweaks like enabling their CDN, bot/hotlink protection, and early hints. They also have paid features like APO (the main one I recommend) which can significantly improve TTFB. It should be increase your website speed if you have run above procedure. While […]

Read more