How to configure virtual directory correctly with right permission on Visual Studio to serve Blazor Standalone frontend

Quentin RODIC 0 Reputation points

I'm currently managing a .NET 6 Blazor standalone application that utilizes WebAssemblyHostBuilder. For deployment, the application is configured to operate under a virtual directory, enabling it to be accessed via a subpath (e.g., However, when I attempt to adjust the applicationhost.config in Visual Studio to reflect this setup, the changes are not effective. It issues a 403 :

User's image

Has anyone encountered issues with configuring the applicationhost.config in Visual Studio ?

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,452 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,765 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 59,056 Reputation points

    you would edit the file (it is in the hidden .vs folder under the project) and update the site section for your website. you are hosting a static website. you will need to update the launch settings also.

    note: to tell the truth, if I wanted to do this, I'd use IIS instead. it has a UI to setup.