Deploy Weavy 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 more details you can also read the Microsoft Docs article Publish an ASP.NET Core app to IIS.

Prerequisites

  • A Windows Server configured with the Web Server (IIS) server role.
  • A server with SQL Server installed.

For production use, we recommend Windows Server 2016 or later, but for development and testing scenarios you can also deploy to a Windows 10 workstation. We also recommend using SQL Server 2016 or later for the database.

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)

  1. Run the installer on the IIS server.

  2. Restart the server or execute net stop was /y followed by net start w3svc in a command shell.

Create IIS site

  1. 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.

  2. In IIS Manager, open the server's node in the Connections panel. Right-click the Sites folder. Select Add Website from the contextual menu.

  3. 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.

  4. 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.

  1. Create an new database, name it weavy.

  2. 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.

Publish and deploy Weavy

First you need to prepare the app for deployment by running the dotnet publish command as described below. This will compile the app code and copy dependencies, configuration files, static assets, etc. into the bin/Release/{TARGET FRAMEWORK}/publish folder.

dotnet publish -c Release

Next, 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 your 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.

Weavy Docs