Rick Strahl's Web Log
Wind, waves, code and everything in between...
Ad-free experience sponsored by:
- the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more
WebLog Posts in Category ASP.NET Core
December, 2017 (1)
November, 2017 (3)
October, 2017 (2)
September, 2017 (6)
August, 2017 (1)
July, 2017 (3)
June, 2017 (2)
May, 2017 (2)
April, 2017 (4)
March, 2017 (5)
February, 2017 (2)
January, 2017 (4)
December, 2016 (5)
November, 2016 (4)
October, 2016 (4)
September, 2016 (5)
August, 2016 (1)
July, 2016 (1)
June, 2016 (6)
May, 2016 (6)
April, 2016 (4)
March, 2016 (3)
February, 2016 (2)
January, 2016 (5)
Visual Studio (44)
ASP.NET Core (23)
Web Services (19)
Web Api (16)
Sql Server (8)
Microsoft AJAX (8)
Web Connection (7)
West Wind Ajax Toolkit (7)
Entity Framework (6)
Html Help Builder (5)
Visual Studio (5)
Live Writer (5)
Source Control (4)
Help Builder (3)
Internet Explorer (3)
.NET Core (3)
Internet Explorer (3)
.NET Core (3)
Software Development (3)
Web Browser Control (3)
ASP.NET vNext (2)
Dynamic Types (1)
Control Development (1)
Markdown Monster (1)
ASP.NET Markdown (1)
Markdown Monster (1)
.NET Standard (1)
ASP.NET Core (1)
Web Deployment Projects (1)
Web Design (1)
Visual Studio Code (1)
Easy Configuration Binding in ASP.NET Core - revisited
December 12, 2017 - Maui, Hawaii
In this post I'm taking another look at using strongly typed configuration settings in ASP.NET Core, using a slightly simpler approach that foregoes using IOptions
in favor of directly using a configuration object instance. In the process I review the various approaches as a summary for getting configuration settings into .NET types.
Dev Intersection 2017 Session Slides and Samples Posted
November 08, 2017 - Maui, Hawaii
I've posted my Session Slides and code samples from last week's DevIntersection conference on GitHub.
.NET Core 2.0 and ASP.NET Core 2.0 are Here
October 22, 2017 - Maui, Hawaii
After a long wait .NET Core and ASP.NET Core 2.0 are finally here. This release is a major update from Version 1.0 that brings back a ton of functionality that was originally missing in .NET Core 1.x. With closer compatibility to full framework .NET it's much easier to port existing code to .NET Core, as having a much larger API surface to use in your applications. There are many usability improvements that make it easier to get started using considerable less fanfare. In this post I describe some of what's new and what's great and also a few things that are not so great.
A few notes on creating Class Libraries for ASP.NET Core
September 26, 2017 - Maui, Hawaii
I recently started to collect some of my ASP.NET Core utilities into a helper support library as I tend to do. In the process I ran into a few snags and I realized I was making a few non-obvious mistakes right from the start. In this post I discuss a few of the issues with dependencies and how to deal with them.
Accepting Raw Request Body Content in ASP.NET Core API Controllers
September 14, 2017 - Maui, Hawaii
When posting raw body content to ASP.NET Core the process is not very self-explanatory. There's no easy way to simply retrieve raw data to a parameter in an API method, so a few extra steps are provided using either manual handling of the raw request stream, or by creating custom formatter that can handle common 'raw' content types in your APIs via standard Controller method parameters. In this post I look at various permutations and how you can access the raw data in your code.
Configuring LetsEncrypt for ASP.NET Core and IIS
September 09, 2017 - Hood River, OR
LetsEncrypt makes it easy to create SSL certificates for your applications for free and lets you automate the process. When using LetsEncrypt with IIS and ASP.NET Core however a few extra steps are required to make an ASP.NET Core site work with LetsEncrypt. I show you how in this post.
Handling HTML5 Client Route Fallbacks in ASP.NET Core
August 07, 2017 - Hood River, OR
HTML5 client routes work great on the client, but when deep linking into a site or pressing refresh in the browser, HTML5 client side routes have a nasty habit of turning into server HTTP requests. Requests to routes that the server is likely not configured for. In this post I look at why HTML5 client routes require server cooperation to handle and how to set them up on IIS and/or ASP.NET Core.
Multi-Targeting and Porting a .NET Library to .NET Core 2.0
June 22, 2017 - Hood River, OR
I've been holding off porting any of my full frameworks to .NET Core. With the latest .NET Core 2.0 and .NET Standard 2.0 releases and their vastly larger footprints that match more closely with what we expect of the .NET Framework feature set, migrating looks a lot more appealing. In this post I describe the process of porting one of my general purpose full framework libraries to .NET Standard 2.0 and in the process also creating a multi-targeted project that compiles .NET 4.5, 4.0 and .NET Standard projects.
Upgrading to .NET Core 2.0 Preview
May 15, 2017 - Hood River, OR
With the release of the first preview of .NET Core 2 and ASP.NET Core 2.0 I decided to upgrade my AlbumViewer sample application to the latest bits and preview tools. Overall the experience was pretty smooth, but I ran into a couple of breaking changes and a few tooling snags that I'll describe in this post.
IIS and ASP.NET Core Rewrite Rules for Static Files and Html 5 Routing
April 27, 2017 - Hood River, OR
If you're running ASP.NET Core under Windows with IIS, you'll want to take advantage of letting IIS serve up your static content and handle your HTML 5 Client and home routes. IIS is very efficient at handling static content and content re-routing and in this post I describe how you can properly configure ASP.NET Core applications using the AspNetCoreModule and IIS Rewrite Rules
Running .NET Core Apps under Windows Subsystem for Linux (Bash for Windows)
April 13, 2017 - Maui, Hawaii
The Windows Shell for Linux (WSL or Bash on Ubuntu on Windows) provides a nice way for Windows and Linux to interact without the overhead of dealing with a separate VM. Using the WSL you can now also run your .NET Core applications directly under Linux without requiring a VM or Docker. In this post I demonstrate how the shell works and how you can run your .NET and ASP.NET Core applications to test operation under Linux.
Updating my AlbumViewer Sample to ASP.NET Core 1.1 and Angular 4
March 31, 2017 - Maui, Hawaii
I updated my AlbumViewer sample application recently to the latest versions of ASP.NET Core (1.1) and the new .csproj project as well Angular 4
More on ASP.NET Core Running under IIS
March 16, 2017 - Maui, Hawaii
Since my last post about hosting ASP.NET Core on IIS I've gotten quite a few questions and comments in regards to working with this mixed IIS/Kestrel hosting environment. There are quite a few not so obvious arrangement in this set up and some surprising discoveries in terms of performance and segragation of feature usage between IIS and Kestrel.
New CODE Magazine Article: Getting down to Business with ASP.NET Core
January 12, 2017 - Maui, Hawaii
The latest issue of CODE magazine features my `Getting down to Business with ASP.NET` Core article as the cover article. The article focuses on building an ASP.NET Core backend for an Angular 2 front application, covering all aspects of separating business and Web app logic, dealing with EF Core data access in related tables, CORS to be able to run across domains and simple authentication in a client centric REST service application. Check it out.
.NET Standard 2.0 - Making Sense of .NET Again
November 23, 2016 - Maui, Hawaii
It's taken awhile but it seems Microsoft is finally nailing the message for .NET going forward and .NET Standard with its common API specification is a huge part in making sure that the same base library of .NET is available on all .NET platforms. In this post I look at what .NET Standard is, how it works and what some of the surrounding issues and impacts are for the .NET Eco system.
Error Handling and ExceptionFilter Dependency Injection for ASP.NET Core APIs
October 16, 2016 - Maui, Hawaii
Exception handling in API applications is important as errors - both handled and unhandled - need to be passed to clients in some way to let them display error information. ASP.NET's default error handling doesn't provide for object error results by default, but you can use an ExceptionFilter to intercept exceptions and format them yourself. In this post I look at how to create an API exception filter to create error object responses, and hook up custom logging of those errors to disk.
External Network Access to Kestrel and IIS Express in ASP.NET Core
September 28, 2016 - Hood River, Oregon
Recently I needed to connect to my Windows based ASP.NET Core API from my Mac and in order for that to work some configuration settings are necesary so that the ASP.NET applications can serve HTTP content to the external network connection that this entails. In this post I show what you have to do to enable remote connections both using the Kestrel and IIS Express Web servers.
ASP.NET Core and CORS Gotchas
September 26, 2016 - Hood River, Oregon
CORS is a requirement for cross domain XHR calls, and when you use Angular 2.0 default dev server and talk to an ASP.NET Core application you'll need to use CORS to get XHR to talk across the domain boundaries. Here's how to set up CORS and how to test it.
First Steps: Exploring .NET Core and ASP.NET Core
June 29, 2016 - Geneva, Switzerland
In this post I'll demonstrate how to get started with .NET Core and ASP.NET using the Command Line Tools. I'll create a few very simple projects and starting with a plain console application, show how to hook up ASP.NET, run an API and MVC app and then run the app locally on Windows and then move it over to run on the Mac. This is not meant to be your typical getting started tutorial that jumps right into Visual Studio and creating a Web project from there. Rather, the purpose of this post is to demonstrate some of the core underpinnings of how .NET Core and ASP.NET Core projects are bootstrapped to run.
Upgrading to ASP.NET Core RTM from RC2
June 27, 2016 - Hood River, OR
I installed and upgraded an ASP.NET Core Sample application today and while the actual project upgrade process from RC2 was relatively easy, there were a few hiccups with installation and one of the breaking changes for the RTM release. In this post I'll go over some of the things I ran into and the workarounds.
ASP.NET Core and .NET Core Overview
June 13, 2016 - Hood River, OR
ASP.NET Core and .NET Core are almost here, with the RTM release scheduled for the end of this month. In this post I’m going to revisit the high level overview architecture of .NET Core and ASP.NET Core since so much has changed, to help you understand how the pieces fit together and what it means to develop on the new stack along with some personal thoughts on how I plan to approach all of this new tech in my own work.
Publishing and Running ASP.NET Core Applications with IIS
June 06, 2016 - Hood River, OR
If you plan on hosting ASP.NET Core applications on IIS, you'll find that the process to get your application to run is quite different than it was with classic ASP.NET. Because ASP.NET Core applications are essentially standalone Console applications that run outside of IIS, some special tooling and new publishing tools are required to get your apps up and running on Windows Server. In this post I'll give an overview of the architecture and show you how to deploy your ASP.NET Core applications using IIS on Windows Server.
Strongly Typed Configuration Settings in ASP.NET Core
May 23, 2016 - Maui, HI
ASP.NET Core provides built-in support for using strongly typed classes to represent configuration information. The configuration system provides a flexible mechanism for using different configuration storage providers and mapping those providers to your strongly typed objects. In this post I show how to set up strongly typed resources and use them in your ASP.NET Web applications.