Manual Build and Deploy (Blazor)
You created your Radzen application. Congratulations! Now it is time to deploy it on your server.
Publish with Visual Studio
1. Open Visual Studio solution from the application root folder
2. Publish selected project to desired target.
Please visit Host and deploy ASP.NET Core Blazor for more info.
Deploy to IIS
- Follow the official Publishing to IIS instructions to prepare IIS for ASP.NET Core support.
- Build the ASP.NET Core application.
- Open a terminal window and go to the directory of your Radzen application.
- Change the current directory to
dotnet publish -c Releaseto package the application in
- Copy the contents of the
server\bin\Release\netcoreapp3.1\publishdirectory to your server.
- Add a web site or an application from the IIS Manager pointing to the location from the previous step.
Now we need to specify the connection string to your production MS SQL Server. We will do this by defining an environment variable with the Radzen application will read at runtime.
- Open IIS Manager.
- Select the Radzen web site/application created in the previous step and click Configuration Editor.
- Open the Section dropdown and select system.webServer/aspNetCore.
- Open the From dropdown and select ApplicationHost.config.
- Click the … button next to environmentVariables.
- Add a new environment variable with name
DataSourceNameis the name of your MS SQL data source as defined in Radzen e.g.
ConnectionStrings:NorthwindConnection. Set the value to the actual connection string to your production MS SQL Server.
- Close the environment variable editor and click the Apply button in the top right corner of the Configuration Editor.