Tag Archives: ASP.NET Core

Passing Javascript values to ASP.NET Core View components

In this post, I show how an ASP.NET Core MVC view can send a Javascript parameter value to an ASP.NET Core view component. Invoking a view component in the view using ‘@await Component.InvokeAsync’ will not work, as this is rendered before the Javascript value has been created. Code: https://github.com/damienbod/AspNetCoreBootstrap4Validation History 2019-01-24 Added an Anti-Forgery token […]

Using Azure Key Vault with ASP.NET Core and Azure App Services

This article shows how to use an Azure Key Vault with an ASP.NET Core application deployed as an Azure App Service. The Azure App Service can use the system assigned identity to access the Key Vault. This needs to be configured in the Key Vault access policies using the service principal. Code: https://github.com/damienbod/AspNetCoreBackChannelLogout Posts in […]

Using MVC ASP.NET Core APPs in a Host ASP.NET Core Application

This article shows how ASP.NET Core applications could be deployed inside a separate host ASP.NET Core MVC application. This could be useful if you have separate applications, services, or layouts but want to have a common user interface, or common deployment to improve the user experience. Code: https://github.com/damienbod/MultipleMvcApps Setup The applications are split into four […]

ASP.NET Core MVC Ajax Form requests using jquery-unobtrusive

This article shows how to send Ajax requests in an ASP.NET Core MVC application using jquery-unobtrusive. This can be tricky to setup, for example when using a list of data items with forms using the onchange Javascript event, or the oninput event. Code: https://github.com/damienbod/AspNetCoreBootstrap4Validation Setting up the Project The project uses the npm package.json file, […]

Implementing User Management with ASP.NET Core Identity and custom claims

The article shows how to implement user management for an ASP.NET Core application using ASP.NET Core Identity. The application uses custom claims, which need to be added to the user identity after a successful login, and then an ASP.NET Core policy is used to authorize the identity. Code: https://github.com/damienbod/AspNetCoreAngularSignalRSecurity Setting up the Project The demo […]

Using an OData Client with an ASP.NET Core API

The article shows how to implement an OData client from an ASP.NET Core application. Bearer token authorization is used to secure the API. Code: https://github.com/damienbod/AspNetCoreOData This blog is part 2 from this blog: Part 1: OData with ASP.NET Core Setting up the applications Three applications are used to implement this, the StsServerIdentity, which is the […]

OData with ASP.NET Core

This article explores how to setup an OData API with ASP.NET Core. The application uses Entity Framework Core with a database first approach using the adventureworks 2016 Microsoft SQL Database. Code: https://github.com/damienbod/AspNetCoreOData Part 2: Using an OData Client with an ASP.NET Core API https://damienbod.com/2018/10/18/using-an-odata-client-with-an-asp-net-core-api/ Setting up the Database The adventureworks 2016 database from the Microsoft/sql-server-samples […]