
In this section, you create a new message-handler class named AuthenticationTestHandler for the new backend. Authenticate clients to the WebAPI backend You can configure it while publishing the app later. If you don't see this page for configure app service plan, continue with the tutorial. After you have selected your app service plan, select OK to create the project. You do not need a database for this tutorial. Select Create a new app service plan, and then create one.Select an Azure App Service plan that you've already created.In the Configure Microsoft Azure Web App window, select a subscription and then, in the App Service plan list, do either of the following actions: Change launchUrl properties from weatherforcast to appbackend.Remove the WeatherForecast.cs and Controllers/WeatherForecastController.cs example files from the new AppBackend project.Remove the WeatherForecast template files Confirm the checkbox for Use controllers(uncheck to use minimal APIs) is checked.In the Configure your new project dialog, name the project AppBackend and select Next. Select the ASP.NET Core Web API project template and select Next.

In Visual Studio's File menu, select New > Project.

To create the web site resources on your account, you must be signed in. Select Server Explorer, and sign in to your Azure account. Start Visual Studio or Visual Studio Express. Make sure you have installed the Visual Studio Azure SDK for website deployment. If your version is not the latest version, uninstall it, and then reinstall the NuGet Package Manager.

Search for NuGet Package Manager in your version of Visual Studio, and make sure you have the latest version. On the Tools menu, select Extensions and Updates. Send notifications to clients: You add a controller to provide a way for users to trigger a secure push to devices and clients associated with the tag.Ĭreate the new ASP.NET Core 6.0 web API backend by doing the following actions:.The authenticated username is automatically added to the registration as a tag. Register for notifications by using the WebAPI backend: You add a controller to handle new registrations for a client device to receive notifications.Authenticate clients: You add a message handler to authenticate client requests and associate the user with the request.The following sections discuss the creation of a new ASP.NET WebAPI backend. Create the backend Web API project that authenticates users.Ĭomplete the Tutorial: Push notifications to Android devices by using Azure Notification Hubs and Firebase Cloud Messaging before doing this tutorial.
