Deploy to IIS
Internet Information Services (IIS) is a popular hosting option for Blazor applications. Radzen Blazor Studio makes deployment to IIS a breeze.
Note: Deployment is a premium feature.
How-to video
Prerequisites
Before deploying your application to IIS make sure that:
- The the .NET hosting bundle is installed on your server.
- MSDeploy is installed on your server as well.
- Your account has sufficient access to deploy.
Deploy
To deploy your Blazor application to IIS:
- Click to open the Publish wizard.
- Select IIS from the available options. This will create a new Radzen Blazor Studio publish profile that can later be used to deploy the application with the same settings.
- Enter the name or IP of the server in the Server textbox.
- Optionally choose a publish method. The default InProc may require administrator access (run Radzen Blazor Studio as Administrator if you encounter permission errors).
- Enter the name of the IIS web site and application you wish to deploy to. For example
Default Web Site/my-razor-app
will deploy the application to<server>/my-razor-app
. - Optionally change the connection string of the database(s) that your application is using. Often applications use a different database in production or a different login credentials.
- Click Publish.
Radzen Blazor Studio will publish the application in production mode and deploy it to IIS. WebAssembly applications will be optimized for size which may take some time. Check the Output for a detailed log of the publish and deploy operations.
Troubleshooting
The production build fails
Make sure your application builds and runs normally before deploying it.
Publish fails with due to insufficient access
Try running Radzen Blazor Studio as Administrator. Alternatively try a different publish method.
The application is deployed but displays an error when browsing
Make sure that the database connection strings are correct and the server can connect to the specified database(s). The Application Event log of the server will contain more details such as exception stacktraces.
If instead of your application you see a generic error message 500.19 check this article.