Skip to main content

Change ASP.NET Core Razor Pages default directory name

One of the new key feature of ASP.NET Core 2.0 is Razor Pages. Razor Pages are simple pages or views without controllers and introduced with the intent of creating page focused scenarios where there is no real logic is involved. You will find razor pages similar to ASP.NET Web Forms. They work on the convention and need to be placed in Pages folder and the extension is .cshtml. If you already have a folder named “Pages” in your solution, then it will create problems. Ideally, you would like to have a different name for the Razor page directory to avoid any issues. This post shows how to change ASP.NET Core Razor Pages default directory name.
Read More

Quick summary of what’s new in ASP.NET Core 2.0

Quick summary of what’s new in ASP.NET Core 2.0

ASP.NET Core 2.0 Preview 1 is already out and you can start building application with ASP.NET Core 2.0. At the time of writing this post, it is still in Preview 1 and final version is expected to be released in Q3-2017. To build ASP.NET Core 2.0 based application, you need to install Visual Studio 2017 Preview 3. Since this is a major release, expect some code breaking changes and a few new pieces. In this post, I try to put together a quick and short summary of what’s new in ASP.NET Core 2.0 compared to ASP.NET Core 1.1. Read More

.NET Standard 2.0 is out and it’s impressive!!!!

Last week, .NET Core 2.0 preview 1 was announced along with ASP.NET Core 2.0 and .NET Standard 2.0. There are lots of new stuff to play with, but this post is focuses on .NET standard 2.0. At the time of writing this post, it is preview 1 release of .NET standard 2.0 and it’s impressive. This post talks about installing .NET standard 2.0 and find out what’s new in .NET Standard 2.0. Read More

How to Compress and Resize/Scale Images in ASP.NET Core

Large size images are slow to load and optimizing them can reduce bandwidth and help your website load faster. TinyPNG is a great place to compress JPEG or PNG images. In fact, we always use TinyPNG to compress images, created for this blog. Along with web interface, they also expose REST API (Free/Paid) to compress images on the fly. In this post, let’s find out how to compress and resize/scale images in ASP.NET Core using TinyPNG API.
Read More

Support multiple versions of ASP.NET Core Web API

Versioning helps in rolling out features on a timely basis, without breaking the existing system. It can also help to provide additional functionalities to selected customers. API versioning can be done in different ways like appending the version in the URL or as a query string parameter, via custom header and via Accept-Header. In this post, let’s find how to support multiple version ASP.NET Core Web API. Read More

upload file via Swagger in ASP.NET Core Web API

How to upload file via Swagger in ASP.NET Core Web API

Swagger is a simple, clean and powerful representation of your RESTful API. Once integrated with WEB API, it provides a UI which helps in testing the API with ease. In my earlier post, I explained about how to integrate swagger with the ASP.NET Core Web API. And it works great with all HTTP verbs and input parameters. But uploading a file via Swagger is not straightforward. In this post, let’s find out how to upload file via Swagger in ASP.NET Core Web API. Read More

Response Caching in ASP.Net Core 1.1

With the ASP.NET Core 1.1 release, many new features were introduced. One of them was enabling gZip compression and today we will take a look at another new feature which is Response Caching Middleware. This middleware allows to implement response caching. Response caching adds cache-related headers to responses. These headers specify how you want client, proxy and middleware to cache responses. It can drastically improve performance of your web application. In this post, let’s see how to implement response caching in ASP.Net Core application. Read More