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

Quentin RODIC 40 Reputation points
2024-05-28T14:57:11.3966667+00:00

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., test.fr/subpath1/). 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 ?

Developer technologies | .NET | Blazor
Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 78,311 Reputation points Volunteer Moderator
    2024-05-28T20:56:48.3+00:00

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.