Skip to main content

How to Implement single authorization policy in ASP.NET Core 2.0

Along with role-based and claim based authorization, ASP.NET Core also supports the policy-based authorization. A policy is nothing but a collection of requirements with different data parameters to evaluate the user Identity. Read more about the policy-based authorization here. This short post shows how to implement single authorization policy in ASP.NET Core 2.0 application. Once implemented, the policy becomes global and applicable to the whole application. (more…)

Read More

MSSQL-cli A new way to interact with SQL Server

MSSQL-cli – A new way to interact with SQL Server

Microsoft recently released a new tool to interact with SQL Server called MSSQL-cli. It’s an interactive command line interface to query SQL server database. Since the release of .NET Core, Microsoft is continuously releasing different cross-platform tools to reach out more developers. At the time of writing this post, the release is in public preview stage. This post talks about installing this tool and then show how to use this tool to query your SQL Server database. (more…)

Read More

Add Swagger to ASPNET Core 20 Web API

Add Swagger to ASP.NET Core 2.0 Web API

Testing WEB APIs is a challenge, and it has a dependency on various third-party tools for proper and efficient testing. But swagger can make it easy. Swagger is an UI representation of your RESTful API. Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources having none of the implementation logic in place. It’s automatically generated from your Swagger specification, with the visual documentation, making it easy for back-end implementation and client-side consumption. Earlier, I posted about adding swagger with ASP.NET Core but it no longer works with ASP.NET Core 2.0 due to new changes with ASP.NET Core 2.0. In this post, we’ll see how to add Swagger to ASP.NET Core 2.0 Web API. (more…)

Read More

How to set HTML Meta tags using Angular 4

How to Set HTML Meta tags using Angular 4

The HTML meta tag provides metadata about the HTML document. Metadata aren’t displayed on the page but are machine parsable. Meta elements are typically used to specify the page description, keywords, author, last modified, and other metadata. The metadata can be used by browsers (how to display content or reload the page), search engines (keywords), or other web services. Meta tags play an important role in SEO. In Angular 4, there is a service named “Meta” that can be used to get and add meta tags. This service can help you to set relevant meta tags based on the active routes, which in turn impacts SEO of your website. This post talks about how to use this service and get/set HTML meta tags using Angular 4. (more…)

Read More

Best Practices for load testing

Best Practices for Load Testing

Optimizing the performance of your website ensures that you get the most out of your online traffic by offering users the experience that they expect. Additionally, search engines reward websites that perform well with top rankings. You will, therefore, gain significant benefits from preparing your website for high traffic loads. Load balancing is the best way to start optimizing the performance of your website because it prepares your website for peak activity. When your website is ready to be stressed to its maximum limits, you can be sure that it will perform well on a daily basis. This post talks about some of the best practices for load testing. (more…)

Read More