Search code examples
azureasp.net-web-apief-code-firstblazorweb-deployment

First time Deployment of Blazor solution with many multiple projects


I am very new and have been exploring coding for quite a while, and I have finally completed a simple vs solution containing multiple projects.

Running the solution now in VS Studio (2019 community) will launch IIS and 4 localhost sites in the browser:

  1. Data Controller (Asp.net api project with swagger)
  2. File Controller (Asp.net api project with swagger)
  3. Admin Portal (Blazor web assembly app project)
  4. Public Portal (Blazor web assembly app project)

Note that the projects have no authentication yet...also I am using EF Core Code-First, and have no idea how to use the builder.HostEnvironment so I hardcoded the data and file Http base addresses in the program.cs Main() of the admin and public blazor projects (e.g. builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("...") }); )

I'd like to try deploying this solution to the cloud (say for example azure) please help me learn how to deploy this! 🙏🙏🙏


Solution

  • You can use azure static web app , its free but you have to register your credit card anyway , you can follow this tutorial .

    https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-blazor I deployed my first apps in azure by this way.