Skip to content

Deploy on Windows

Use this guide to deploy and configure precompiled Virto Commerce Platform V3.

Prerequisites

You have two options for installing the platform

  • Manual downloading the precomplied binaries
  • Using CLI (beta)

Downloading the precomplied binaries

  • Navigate to the Releases section of Virto Commerce Platform in GitHub.

  • You will find VirtoCommerce.Platform.3.x.x.zip file. In this file the site has already been built and can be run without additional compilation. The source code is not included.

  • Unpack this zip to a local directory C:\vc-platform-3. After that you will have the directory with Platform precompiled files.

Using vc-build CLI (beta).

  • Install vc-build
    dotnet tool install -g VirtoCommerce.GlobalTool
    
  • Install platform and modules
    vc-build install
    
    Also you can specify the platform version:
    vc-build install -version 3.55.0
    
    Check out vc-build for packages management for more info.

Setup

Configure application strings

  • Open the appsettings.json file in a text editor.
  • In the ConnectionStrings section change VirtoCommerce node (provided user should have permission to create new database):
    "ConnectionStrings": {
        "VirtoCommerce" : "Data Source={SQL Server URL};Initial Catalog={Database name};Persist Security Info=True;User ID={User name};Password={User password};MultipleActiveResultSets=True;Connect Timeout=30"
    },

Running the Platform on HTTPS schema

  • Install and trust HTTPS certificate

Run to trust the .NET Core SDK HTTPS development certificate:

    dotnet dev-certs https --trust

Read more about enforcing HTTPS in ASP.NET Core

  • Run the Platform:

You can start platform by CLI "dotnet"

cd C:\vc-platform-3\
dotnet.exe VirtoCommerce.Platform.Web.dll

The output in the console will say something like:

Now listening on: http://localhost:5000
Now listening on: https://localhost:5001

Running the Platform only on HTTP schema

  • In order to run the platform only at HTTP schema in production mode, it's enough to pass only HTTP URLs in --urls argument of the dotnet command.
  dotnet VirtoCommerce.Platform.Web.dll --urls=http://localhost:5000

First run sign in

  • Open https://localhost:5001 url in your browser. "Your connection is not private" might appear. Click "Advanced" and "Proceed to ...". Read more on removing this error and using a self-signed certificate: Trust the ASP.NET Core HTTPS development certificate
  • The application will create and initialize database on the first request. After that you should see the sign in page. Use the following credentials:
  • Login: admin
  • Password: store

Content Configuration in application settings

If you plan to run Virto Commerce on either custom domain or port, you will need to change public url for Assets and Content:

  • Open the appsettings.json file in a text editor.

  • In the Assets section set public url for assets Assets:FileSystem:PublicUrl with url of your application, this step is needed in order for display images

"Assets": {
        "Provider": "FileSystem",
        "FileSystem": {
            "RootPath": "~/assets",
            "PublicUrl": "https://localhost:5001/assets/" <-- Set your platform application url with port localhost:5001
        },
    },
  • In the Content section set public url for content Content:FileSystem:PublicUrl with url of your application, this step is needed in order for configure CMS content storage
"Content": {
        "Provider": "FileSystem",
        "FileSystem": {
            "RootPath": "~/cms-content",
            "PublicUrl": "https://localhost:5001/cms-content/" <-- Set your platform application url with port localhost:5001
        },
    },

Host on Windows with IIS

The required web.config file was already included in the release package. It contains all the necessary settings for running in IIS.

Read more in the official Microsoft ASP.NET Core documentation: Host ASP.NET Core on Windows with IIS

Open the VirtoCommerce Platform application in the browser.


Last update: May 17, 2021