Live Chat Icon For mobile
Live Chat Icon

Blazor FAQ

Find answers for the most frequently asked questions
Expand All Collapse All

The Blazor application can be deployed to IIS using Visual Studio or you can also configure manually. Find the steps to deploy the Blazor application.

Deploy an app from Visual Studio to IIS

  1. Install the .NET Core Runtime Hosting Bundle in  your device.
  2. Create a Blazor application
  3. Publish the application using context menu from the Solution Explorer in Visual Studio.
Publish
  1. Click Publish. If there is no error, your application will be published successfully.

Manual Deployment to IIS

You can publish the Blazor application using “dotnet publish” command. Please refer to the document dotnet publish for additional commands.

IIS config

  1. Open the IIS.
  2. Right click  the defaultApp site and create a new website.
  3. Insert the site name and physical path (published folder path).
Add Physical Path
  1. Click Ok .
  2. Now, config the site in ApplicationPool, and you can browse the site.
Permalink

You must update the virtual app path or app base path in index.html to resolve this issue.

That is, the hosted application expects the assets from root folder of the web server. So, you have to update the subfolder name in index.html to serve the files from the path.

For example, if I am hosting an application in http://example.com/blazor/, the index.html looks like the following.

  <base href="/blazor/" />   

For more information, refer to this link for updating app-base-path.

Permalink

Share with

Share on twitter
Share on facebook
Share on linkedin

Couldn't find the FAQs you're looking for?

Please submit your question and answer.