Deploy to IIS
This article explains one way of deploying Weavy to an IIS web server. Depending on your requirements, environment, and security considerations you may need to do things differently. For additional details we recommend reading the Microsoft Docs article Publish an ASP.NET Core app to IIS.
Prerequisites
- A Windows Server with the Web Server (IIS) role.
- A database server with SQL Server 2017 (or later) installed.
Install .NET Core Hosting Bundle
Install the .NET Core Hosting Bundle on the IIS server. The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module. The module allows ASP.NET Core apps to run behind IIS.
You can download the installer using the following link: Current .NET Core Hosting Bundle installer (direct download)
- Run the installer on the IIS server.
- Restart the server or execute
net stop was /y
followed bynet start w3svc
in a command shell.
Create IIS site
- On the IIS server, create a folder to contain the app's published folders and files. In a following step, the folder's path is provided to IIS as the physical path to the app.
- In IIS Manager, open the server's node in the Connections panel. Right-click the Sites folder. Select Add Website from the contextual menu.
- Provide a Site name and set the Physical path to the app's deployment folder that you created. Provide the Binding configuration and create the website by selecting OK. A production site should always be configured to use the HTTPS protocol. For more information, see How to Set Up SSL on IIS.
- Confirm that the process model identity has the proper permissions.
If the default identity of the app pool (Process Model > Identity) is changed from
ApplicationPoolIdentity
to another identity, verify that the new identity has read and write access to the app folder.
Create database
Open Microsoft SQL Server Management Studio (SSMS) and connect to your database server.
- Create an new database, name it
weavy
. - Create a database login and map it to a database user in the
weavy
database. Make sure that the user has the database role db_owner.
Download Weavy
Now you are ready to download and build the Weavy backend code. To do that you need a machine with Git and the .NET SDK installed.
For now, we only support building and running Weavy on Windows. If you are on a Mac or Linux machine, you can use a virtual machine to complete these steps.
The backend code is available on GitHub. In a terminal window, run the following command to clone the repository:
git clone https://github.com/weavy/weavy-server.git
Instead of cloning, you can also fork the repo. This lets you make changes to the project and allows you to easily fetch updates when we release new versions of Weavy.
Configure app settings
Create a file named appsettings.json
in the src
folder. Add settings for database connection string and license as described below:
{
"ConnectionStrings": {
"Weavy": "server=localhost;database=weavy;trusted_connection=true;trustservercertificate=true;"
},
"Weavy": {
"License": "YOUR-LICENSE-KEY"
}
}
Build and publish
Next, build and publish the app by running the dotnet publish
command as described below:
dotnet publish -c Release
This compiles the app code and copies dependencies, configuration files, static assets, etc. into the bin/Release/{TARGET FRAMEWORK}/publish
folder.
Finally, move the contents of the bin/Release/{TARGET FRAMEWORK}/publish
folder to the IIS site folder on the server.
Browse the website
That should be it. Open a browser and navigate to the endpoint binding that you established in IIS Manager for the site. If everything worked out you should see the Weavy logo on your screen.
Troubleshooting
In case of any errors we recommend looking at the logfiles in the logs
folder. They usually contain valuable information on what went wrong.
One common problem is that the database connection string is misconfigured.