Azure / reliable-web-app-pattern-dotnet

The Reliable Web App Pattern is a set of objectives to help your web application converge on the cloud. This repo contains a reference implementation of a reliable web application for .NET.
https://aka.ms/eap/rwa/dotnet/doc
MIT License
374 stars 120 forks source link

Fix `View not found` error #311

Closed KSchlobohm closed 1 year ago

KSchlobohm commented 1 year ago

Describe the bug Started the web app and saw an error screen.

To Reproduce Steps to reproduce the behavior:

  1. Clone the code
  2. Start the front-end web app

Expected behavior Expected to see the home page

Screenshots image

KSchlobohm commented 1 year ago

One possibility is that the Razer page was not compiled.

Based on docs this feature is key to the way devs work on CSS and JavaScript based features with the expectation that the Razer page is recompiled without restarting the web app.

A proposed change could look like

        private void AddAzureAdServices(IWebHostEnvironment env, IServiceCollection services)
        {
            var mvcBuilder = services.AddRazorPages().AddMicrosoftIdentityUI();

            if (env.IsDevelopment())
            {
                mvcBuilder.AddRazorRuntimeCompilation();
            }
KSchlobohm commented 1 year ago

A possible workaround, without code change, could be to try:

  1. Right-click Solution ➡️ Clean
  2. Right-click Solution ➡️ Build
  3. Use Visual Studio to F5 debug/start the code
KSchlobohm commented 1 year ago

migrated to 1852536