What's best practice for migration to ASP.NET Core Edition? #208
-
With PR #207, what's the migration/upgrade path to ASP.NET Core? Is it a matter of using upgrade-assistant or try-convert or a drop-down setting change in the project file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's a rewrite from scratch. The changes are significant enough you will want to re-do all your controllers. Firstly, let's talk authentication. We switched over the ASP.NET Core Identity instead of relying on Azure App Service Authentication. This means that you have to rip out what you were doing and replace it with ASP.NET Core Identity. I included a simple way to get Azure App Service Authentication back by integrating it into the ASP.NET Core Identity framework. Secondly, the controllers are different. You now have to provide an access control provider, which is an interface that consists of three methods - one to limit what a user can see, one to authorization a user, and one to process an item before it is written. Combined, they provide the needs of 99% of the use cases. The extra 1% can be done by overriding the specific methods and calling the base class to do the operation. Between those two, you'll quickly realize that the structure of an app is very different. I'd suggest looking at the sample here: https://github.com/Azure/azure-mobile-apps/tree/main/samples/aspnetcore and the test web service here: https://github.com/Azure/azure-mobile-apps/tree/main/sdk/dotnet/test/Microsoft.AzureMobile.WebService.Test Also, note that we are re-namespacing and going through the normal release stuff prior to release. As a result, expect the names of things to change prior to release. |
Beta Was this translation helpful? Give feedback.
It's a rewrite from scratch. The changes are significant enough you will want to re-do all your controllers.
Firstly, let's talk authentication. We switched over the ASP.NET Core Identity instead of relying on Azure App Service Authentication. This means that you have to rip out what you were doing and replace it with ASP.NET Core Identity. I included a simple way to get Azure App Service Authentication back by integrating it into the ASP.NET Core Identity framework.
Secondly, the controllers are different. You now have to provide an access control provider, which is an interface that consists of three methods - one to limit what a user can see, one to authorization a user, and one to pro…