I am an engineer, Microsoft MVP living in Switzerland interested in web development. My favorite technologies are ASP.NET, Javascript, Angular, Typescript, MS SQL Server, SQLite and Elasticsearch.
Find Me Online
gitHub | ASP.NET | NuGet | twitter | Microsoft MVP | npm
Founded Angular Switzerland Group
Weekly updates from the community about Angular and related stuff
Member of ASP.NET Web API Contrib
Documentation:
- Microsoft ASP.NET Core Documentation for Globalization and localization
- http://localizationsqllocalizer.readthedocs.io/en/latest/index.html
NuGet packages which I created or helped with:
- Localization.SqlLocalizer
- WebApiContrib.Tracing.Slab
- ElasticsearchCRUD
- Unity.SelfHostWebApiOwin
- Policeman.Guard
- CacheCow.Server.EntityTagStore.Elasticsearch
- WebApiContrib.Core.Formatter.Csv
- WebApiContrib.Core.Formatter.Protobuf
Published Articles
- Jan 4, 2019: Deploying ASP.NET Core App Services using Azure Key Vault and Azure Resource Manager templates
- Nov 6, 2018: Implementing User Management with ASP.NET Core Identity and Custom Claims
- 16th October, 2018: Creating PDF files in ASP.NET Core
- 12th September, 2018: An ASP.NET Core IdentityServer4 Identity Template with Bootstrap 4 and Localization
- 5th July, 2018: Updating ASP.NET Core Identity to use Bootstrap 4
- 29th June, 2018: An ASP.NET Core Razor Pages Bootstrap 4 Application using Webpack, Typescript, and npm
- 8th June, 2018: Dynamic CSS in an ASP.NET Core MVC View Component
- 2nd April, 2018: Using Message Pack with ASP.NET Core SignalR
- 15th March, 2018: Adding HTTP Headers to improve Security in an ASP.NET MVC Core application
- 7th March, 2018: Securing an ASP.NET Core MVC application which uses a secure API
- 13th Feb 2018: Using the dotnet Angular template with Azure AD OIDC Implicit Flow
- 16th Jan 2018: Using an EF Core database for the IdentityServer4 configuration data
- 15th Dec 2017: Sending Direct Messages using SignalR with ASP.NET core and Angular
- Nov 10, 2017: IdentityServer4 Localization with the OIDC Implicit Flow
- Aug 23, 2017: ASP.NET Core 2.0 MVC File Upload with MS SQL Server Filetable
- June 6, 2017: Using Angular in an ASP.NET Core View with Webpack
- May 2, 2017: ASP.NET Core Error Management with elmah.io
- Apr 18, 2017: Testing an ASP.NET Core MVC Protobuf API using HTTPClient and xUnit
- Apr 6, 2017: Implementing an Audit Trail using ASP.NET Core and Elasticsearch with NEST
- Feb 7, 2017: Building production ready Angular apps with Visual Studio and ASP.NET Core
- Nov 02, 2016: ASP.NET Core Action Arguments Validation using an ActionFilter
- Sep 28, 2016: ASP.NET Core 1.0 with MySQL and Entity Framework Core
- Sep 23, 2016: Implementing Undo, Redo in ASP.NET Core
- Sep 9, 2016: ASP.NET Core logging with NLog and Elasticsearch
- July 18, 2016: Using Webpack with Visual Studio and ASP.NET Core
- April 26, 2016: Angular 2 Localization with an ASP.NET Core MVC Service
- March 8, 2016: Secure file download using IdentityServer4, Angular2 and ASP.NET Core
- January 5, 2016: Experiments with Entity Framework 7 and ASP.NET 5 MVC 6
- December 16, 2015: ASP.NET 5 / MVC 6 File Upload with SQL Server FileTable
- December 3, 2015: OAuth2 Implicit Flow with Angular and ASP.NET 5 IdentityServer
- September 4, 2015: ASP.NET 5 with SQLite and Entity Framework 7
- August 6, 2014: Getting started with Web API and OData V4
- 4th October 2018: Creating a PDF in ASP.NET Core using MigraDoc PDFSharp
- 1st October 2018: Creating PDF files in ASP.NET Core
- 24th September 2018: Deploying an ASP.NET Core application to Windows IIS
- 16th August 2018: Implementing a multi-tenant OIDC Azure AD external login for IdentityServer4
- 14th August 2018: Is Active Route Tag Helper for ASP.NET MVC Core with Razor Page support
- 8th August 2018: Disabling parts of ASP.NET Core Identity
- 16th July 2018: Updating part of an ASP.NET Core MVC View which uses Forms
- 4th July 2018: Adding Localization to the ASP.NET Core Identity Pages
- 27th June 2018: Updating ASP.NET Core Identity to use Bootstrap 4
- 25th June 2018: An ASP.NET Core Razor Pages Bootstrap 4 Application using Webpack, Typescript, and npm
- 18th June 2018: ASP.NET Core MVC Form Requests and the Browser Back button
- 5th June 2018: Dynamic CSS in an ASP.NET Core MVC View Component
- 14th May 2018: Uploading and sending image messages with ASP.NET Core SignalR
- 26th Apr 2018: OAuth Authentication with PKCE for a .NET Core Console Native Application
- 20th Apr 2018: ASP.NET Core Authorization for Windows, Local accounts
- 16th Apr 2018: Supporting both Local and Windows Authentication in ASP.NET Core MVC using IdentityServer4
- 28th Mar 2018: Comparing the HTTPS Security Headers of Swiss banks
- 21st Mar 2018: Using Message Pack with ASP.NET Core SignalR
- 20th Mar 2018: First experiments with makecode and micro:bit
- 15th Mar 2018: Securing the CDN links in the ASP.NET Core 2.1 templates
- 9th Feb 2018: Adding HTTP Headers to improve Security in an ASP.NET MVC Core application
- 5th Feb 2018: Securing an ASP.NET Core MVC application which uses a secure API
- 24th Jan 2018: Using the dotnet Angular template with Azure AD OIDC Implicit Flow
- 08th Jan 2018: Creating specific themes for OIDC clients using razor views with IdentityServer4
- 02th Jan 2018: Using an EF Core database for the IdentityServer4 configuration data
- 6th Dec 2017: Sending Direct Messages using SignalR with ASP.NET core and Angular
- 13th Nov 2017: IdentityServer4 Localization using ui_locales and the query string
- 07th Nov 2017: IdentityServer4 Localization with the OIDC Implicit Flow
- 02nd Nov 2017: Shared Localization in ASP.NET Core MVC
- 24th October 2017: Implementing custom policies in ASP.NET Core using the HttpContext
- 17th October 2017: Securing an Angular SignalR client using JWT tokens with ASP.NET Core and IdentityServer4
- 2nd October 2017: Using EF Core and SQLite to persist SignalR Group messages in ASP.NET Core
- 19th September 2017: SignalR Group messages with ngrx and Angular
- 18th September 2017: Getting started with SignalR using ASP.NET Core and Angular
- 14th August2017: Angular Configuration using ASP.NET Core settings
- June 17, 2017: Implementing Two-factor authentication with IdentityServer4 and Twilio
- 12th July 2017: Adding an external Microsoft login to IdentityServer4
- 3rd July 2017: Using Protobuf Media Formatters with ASP.NET Core
- 19th June 2017: Angular OIDC OAuth2 client with Google Identity Platform
- 12th June 2017: OpenID Connect Session Management using an Angular application and IdentityServer4
- 5th June 2017: Implementing a silent token renew in Angular for the OpenID Connect Implicit flow
- 10th May 2017: Anti-Forgery Validation with ASP.NET Core MVC and Angular
- 8th May 2017: Secure ASP.NET Core MVC with Angular using IdentityServer4 OpenID Connect Hybrid Flow
- 3rd May 2017: Using Angular in an ASP.NET Core View with Webpack
- 18th April 2017: ASP.NET Core IdentityServer4 Resource Owner Password Flow with custom UserRepository
- 12th April 2017: Implementing OpenID Implicit Flow using OpenIddict and Angular
- 30th March 2017: .NET Core, ASP.NET Core logging with NLog and PostgreSQL
- 16th March 2017: ASP.NET Core Error Management with elmah.io
- 10th March 2017: Testing an ASP.NET Core MVC Protobuf API using HTTPClient and xUnit
- 3rd March 2017: .NET Core logging to MySQL using NLog
- 1st March 2017: Implementing an Audit Trail using ASP.NET Core and Elasticsearch with NEST
- 2nd February 2017: Hot Module Replacement with Angular and Webpack
- 30th January 2017: Creating an ASP.NET Core Docker application and deploying to Azure
- 30th January 2017: Docker compose with ASP.NET Core, EF Core and the PostgreSQL image
- 16th January 2017: Angular 2 Lazy Loading with Webpack 2
- 3rd January 2017: Building production ready Angular apps with Visual Studio and ASP.NET Core
- 28th December 2016: Creating an ASP.NET Core 1.1 VS2017 Docker application
- 19th December 2016: Implementing a Client White-list using ASP.NET Core Middleware
- 14th December 2016: EF Core diagnosis and features with MS SQL Server
- 28th November 2016: Contributing to OSS projects on gitHub using fork and upstreams
- 21st November 2016: Extending Identity in IdentityServer4 to manage users in ASP.NET Core
- 31st October 2016: Angular2 search with ASP.NET Core and Elasticsearch
- 18th October 2016: Angular2 autocomplete with ASP.NET Core and Elasticsearch
- 17th October 2016: Using SASS with Webpack, Angular2 and Visual Studio
- 3rd October 2016: IdentityServer4, Web API and Angular2 in a single ASP.NET Core project
- 23rd September 2016: Setting the NLog database connection string in the ASP.NET Core appsettings.json
- 19th September 2016: Full Server logout with IdentityServer4 and OpenID Connect Implicit Flow
- 12th September 2016: ASP.NET Core Action Arguments Validation using an ActionFilter
- 9th September 2016: Angular 2 Auto Save, Undo and Redo
- 30th August 2016: Implementing UNDO, REDO in ASP.NET Core
- 26th August 2016: ASP.NET Core 1.0 with MySQL and Entity Framework Core
- 22nd August 2016: ASP.NET Core logging with NLog and Elasticsearch
- 18th August 2016: ASP.NET Core logging with NLog and Microsoft SQL Server
- 18th July 2016: Import, Export ASP.NET Core localized data as CSV
- 14th July 2016: Injecting Configurations in Razor Views in ASP.NET Core
- 20th June 2016: Import and Export CSV in ASP.NET Core
- 13th June 2016: ASP.NET Core, Angular2 with Webpack and Visual Studio
- 8th June 2016: Adding SQL localization data using an Angular 2 form and ASP.NET Core
- 27th May 2016: Creating and requesting SQL localized data in ASP.NET Core
- 26th May 2016: Released SQL Localization NuGet package for ASP.NET Core, dotnet
- 3rd May 2016: Angular 2 Localization with an ASP.NET Core MVC Service
- 4th Apr 2016: Angular2 secure file download without using an access token in URL or cookies
- 29th Mar 2016: Angular 2 child routing and components
- 15th Mar 2016: Secure file download using IdentityServer4, Angular2 and ASP.NET Core
- 3rd Mar 2016: Angular2 OpenID Connect Implicit Flow with IdentityServer4
- 29th Feb 2016: Angular OpenID Connect Implicit Flow with IdentityServer4
- 15th Feb 2016: Authorization Policies and Data Protection with IdentityServer4 in ASP.NET Core
- 1st Feb 2016: ASP.NET Core 1.0 using SQL Localization
- 12th Jan 2016: ASP.NET 5 with PostgreSQL and Entity Framework 7
- 8th Jan 2016: Experiments with Entity Framework 7 and ASP.NET 5 MVC 6
- 14th Dec 2015: ASP.NET 5 MVC 6 API documentation using Swashbuckle Swagger
- 18th Nov 2015: Using Elasticsearch with ASP.NET 5 dnxcore50
- 9th Nov 2015: OAuth2 Implicit Flow with Angular and ASP.NET 5 Identity Server
- 26th Oct 2015: Using DataAnnotations and Localization in ASP.NET 5 MVC 6
- 22nd Oct 2015: ASP.NET 5 MVC 6 Localization
- 19th Oct 2015 ASP.NET 5 updating to beta8 from older beta versions
- 12th Oct 2015: ASP.NET 5 multiple configurations without using environment variables
- 01 Oct 2015: ASP.NET 5 Exception Filters and Resource Filters
- 30 Sep 2015: ASP.NET 5 with SQLite and Entity Framework 7
- 30 Sep 2015: ASP.NET 5 Action Filters
- 06 Jul 2015: Visualizing Elasticsearch Watcher events using ASP.NET 5, SignalR and Angular
- 22 Jun 2015: An ASP.NET 5 Angular application with Elasticsearch, NEST and Watcher
- 12 Jun 2015: Creating HTML themes in ASP.NET 5 using Sass
- 04 Jun 2015: ASP.NET 5 MVC 6 Custom Protobuf Formatters
- 29 May 2015: Drag and drop bootstrap tabs in ASP.NET 5 with Angular
- 13 May 2015: ASP.NET 5 Typescript AngularJS application with a grunt production configuration
- 27 Apr 2015: Batching in an ASP.NET 5 AngularJS application using angular-http-batcher
- 30 Mar 2015: ASP.NET 5 angularJS application using angular-ui-router
- 23 Feb 2015: MVC 6 aspnet50 full text search with Elasticsearch
- 29 Jan 2015: Elasticsearch Bulk Insert
- January 8, 2019: Updating part of an ASP.NET Core MVC View which uses Form
- December 31, 2018: Is Active Route Tag Helper for ASP.NET MVC Core with Razor Page support
- December 22, 2018: Adding Localization to the ASP.NET Core Identity Pages
- December 19, 2018: An ASP.NET Core Razor Pages Bootstrap 4 Application using Webpack, Typescript, and npm
- December 2, 2018: Updating ASP.NET Core Identity to use Bootstrap 4
- November 24, 2018 : ASP.NET Core MVC Form Requests and the Browser Back button
- October 2, 2018 : Dynamic CSS in an ASP.NET Core MVC View Component
- September 13, 2018: Supporting both Local and Windows Authentication in ASP.NET Core MVC using IdentityServer4
- 2nd May, 2018: Using Message Pack with ASP.NET Core SignalR
- 20th April, 2018 : Securing the CDN links in the ASP.NET Core 2.1 templates
- 8th April, 2018 : Adding HTTP Headers to improve Security in an ASP.NET MVC Core application
- 4th March, 2018 : Using the dotnet Angular template with Azure AD OIDC Implicit Flow
- November 27, 2017 : Shared Localization in ASP.NET Core MVC
- September 9, 2017 : Building production ready Angular apps with Visual Studio and ASP.NET Core
- February 25, 2017 : Import and Export CSV in ASP.NET Core
- July 21, 2016: ASP.NET Core 1.0 with PostgreSQL and Entity Framework Core
- June 26, 2016: Experiments with Entity Framework Core and ASP.NET Core 1.0 MVC
- June 15, 2016: ASP.NET Core 1.0 MVC Localization
- February 8, 2016: ASP.NET 5 with SQLite and Entity Framework 7
- January 8, 2016: ASP.NET 5 angularJS application using angular-ui-router
- January 2, 2016: MVC Google Maps search using Elasticsearch
- December 8, 2015: ASP.NET 5 MVC 6 Custom Protobuf Formatters
- November 21, 2015: Creating HTML themes in ASP.NET 5 using Sass
- October 21, 2015: ASP.NET 5 Typescript AngularJS application with a Grunt production configuration
- April 19, 2015: MVC application with Entity Framework and Elasticsearch
- March 3, 2015: CSV export using Web API and Elasticsearch
- January 19, 2015: MVC CRUD with Elasticsearch Nested documents
- November 18, 2014: Full Text Search with ASP.NET MVC, jQuery autocomplete and Elasticsearch
- November 3, 2014: Web API OData V4 Keys, Composite Keys and Functions
- October 25, 2014: Web API OData V4 Batching
- September 1, 2014: Web API OData V4 Using Contained Models Part 6
- August 15, 2014: Web API OData V4 Using Unity IoC, SQLite with EF6 and OData Model Aliasing Part 5
- August 2, 2014: Web API and OData V4 CRUD and Actions Part 3
- July 12, 2014: Web API Tracing with SLAB and Elasticsearch
- July 5, 2014: Getting Started with Web API and OData v4
- June 13, 2014: Web API Localization
- May 8, 2014 : Exploring Web API Exception Handling
- February 8, 2014: Web API 2 using ActionFilterAttribute, OverrideActionFiltersAttribute and IoC Injection
have a twitter handle damien?
Hi, no, never got around to creating one, never had a need for it yet
Greetings Damien
created a twitter account
https://twitter.com/damien_bod
Greetings Damien
Hi Damien,
I am interested in your ” ANGULAR2 OPENID CONNECT IMPLICIT FLOW WITH IDENTITYSERVER4″ article and sample. I am in the process of building a typescript definition file for https://github.com/IdentityModel/oidc-client-js/tree/dev (from dev branch where oidc js library was rewritten in ES6) so it can be used in Angular 2 applications for better code complition. I didn’t create strongly typed structures, I use only “any” type. this is my first attempt:
https://drive.google.com/file/d/0B1I1nQTGClv3STNfUmJSbkc1b2M/view?usp=sharing
I would like to use this library instead of your custom code that handles tokens because it offers a lots of useful functionality with UserManager adn Oidc
I am using https://github.com/ToddThomson/tsproject/wiki/Using-TsProject-with-Gulp project to help me build .d.ts for individual ES6 files (that I convert to .ts). I need a help in determining if my index.d.ts for oidc.js client written ES6 will properly function with Angular 2. Let me know. Regards,
Rad
Hi Rad, thanks
sounds good, I’ll try it out. At present, I’m busy updating to ASP.NET Core RC2, which will take about a week. Then I’ll have a go.
Thanks for the code.
Greetings Damien
You can see here a folder with files I added to https://github.com/IdentityModel/oidc-client-js/tree/dev to automate my converstion to .ts :
https://drive.google.com/open?id=0B1I1nQTGClv3RWRPbTAzY2w3bWc
You need to run: npm install and then a series of gulp commands in this order:
1. clean
2. copy
3. rename
4. deleteconvertedjs
5. build
this will create .d.ts, and .js (based on .ts transpilation to es5).
I then manually create ./index.d.ts in the root copying all the content from all the files and remove imports and add a namespace and exprort 2 important classes.
If we can come up with github based repository where we can automate retrieval of oidc js client (currently under dev branch) and merging it with my build system that would be great especially if we can automate producing ts definition file.
Here is a good video that demonstrates usage of UserManager and OidcClient:
you can send a reply to my email address. I can share my skype id so we can connect that way and do a shared sessions via teamviewer.
Hello Damien. Let me first thank you for you blog posts and source code examples. They have been extremely helpful up to this point. However, I’ve hit a bit of a wall. I’m try to use OpenID Connect to secure an API that is backed by several microservices. I’ve been successful in getting the API to authenticate using the access token JWT in the Bearer header. However, for some back-end microservices, I would like to pass the id_token to the services that need to know the end user. So a have a couple questions below:
1. Why are you using the UseJwtBearerAuthentication and not the UseIdentityServerAuthentication middleware?
2. Do either of these middleware allow for automatic retrieval of the id_token?
3. If not, would you create your own middleware to retrieve id_token?
4. Have you seen any examples a SPA, calling an API, which further calls back-end microservices?
Any help would be appreciated. If there is a better way to discuss this, let me know.
Hi John, sorry for the very slow slow answer. It’s hard to keep track and do a day job at the same time.
When I set this up, UseIdentityServerAuthentication didn’t work and all platforms, now it’s ok, so I could update it.
No, not that I know of.
Yes, some examples in the IdentityServer 4 samples which use a C# HTTP Client
Hopes this helps,
Greetings Damien
Hi Damien,
I enjoy reading most of your articles and wanted to thank you.
Also wanted to suggest an article on “JavaScriptServices” and particularly http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/ great productivity template. Unfortunatly no one have wrote anything about them, yet.
It would probably make your wonderful collection even more complete.
Thanks,
Dave
Hi Damien,
I just came across your site, loving it so far. Great stuff. Hopefully you can answer this for me. I have been doing Angular 1.x work for a while. I decided to exclude any Microsoft from my front end and just use WebAPI for the back end – NO MVC. So I use Visual Studio, have a pure HTML, CSS, Angular front end, and then WebAPI to the backend.
Now I am trying to migrate to Angular2, finding it hard to find examples of this. It seems the articles I can find have MVC baked in, ASP.NET Core or not.
So my questions. Can replicate my dev envorinment with Angular2? I really do not want to embark on a new backend using ASP.NET Core – A) I have all my C# code working already and B) my brain can’t handle all that at once.
I currently have a grunt process transpiles all my TS to JS so I can use it. Would I be doing the same with A2 but using webpack instead?
I was doing a bit of R&D and using the A2 cli, I can get a project and run it but the ‘compile’ step seem to talk very long. Not sure if that is just the way it is, seems that people would accept that so not sure if that was me, or again, just the way webpack it. I see that AOT is where it is, everyone is moving away from JIT.
In short, I want to compile all my code in VS. So C# and A2. Then run it in IE for debugging or Chrome.
Thanks
Ralph
First off – Angular2WebpackVisualStudio VERY nice and what I had been looking for. But a few newbie questions.
• In the Task Runner Explorer there are tasks defined ( like build-dev, etc) from the package.json and I see them define in the json file. But where do the tasks in the webpage.config.js come from? Like hot, cold, etc.
• What is the difference between all these options.
• If I run ‘hot’, it runs webpack-server-dev and love that I can make my changes in ts and see them automatically in the browser but the webapi doesn’t work. I need to run this from dotnet with dotnet run, the webservice works but now I do not get the auto loading. Is there a way to get both?
Again, awesome work, this helped me a ton.
Hi Damien,
When I create a production deployment and deploy it in a subfolder so the URL would be http://www.sitename.com/products/main for example, the site fails. I realize there are changes need to the prod weback site and I have made progess but I do not have it all figured out. I changed output.publicPath and added plugin to change my base in the index.html. That fixes some of the issues but not all and the biggest, looks like the routing is messed up. I can navigate to pages but not type them in and go to them directly, like if you saved it in a bookmark.
Awesome code.. Very helpful.
Thanks
Ralph
Hi Damien, I was looking for an article on how to log into SQL Server, via NLog, in ASP.NET Core 2.0? Do you know how to do this?
Nice blog Damien. You should create a LinkedIn account as well.
Hi damienbod, did you find solution for below url issue?. If you found can you please share with me.
https://github.com/aspnet/Security/issues/1465.