Quick Start on Windows¶
This section will quickly guide you through simple Storefront setup based on Windows environment.
Note
If Platform and Storefront are deployed in the same on-premises environment, Storefront should be deployed on a different port from Platform.
Prerequisites¶
Prior to installing Storefront, install:
-
And launch Platform latest version. Deploy it:
-
Install the Profile Experience API module.
-
Configure stores from scratch or Install sample data.
-
Go to the Security section, create a new frontend user with the role of Administrator, and remember the login credentials.
Install Storefront with Precompiled Version¶
To install Storefront:
- Download Storefront latest release.
- Unpack it to a local folder, e.g.,
c:\vc-storefront
. After thatm you will have the directory with Storefront precompiled files - Open the
appsettings.json
file in a text editor. -
In the
Endpoint
section, supply the correct path and credentials for the Virto Commerce Platform in theUrl
,UserName
, andPassword
fields: -
In the
VirtoCommerce
section, changeDefaultStore
toB2B-Store
:
Install vc-theme-b2b-vue from Bundle¶
To install the B2B Vue theme:
- Download latest theme release.
-
Unpack the
vc-theme-b2b-vue-x.xx.x.zip
package containing the theme to{storefront path}\wwwroot\cms-content\themes\{store-name}
, e.g.:
Note
Storefront seamlessly handles theme content resolution through paths in CMS Content Themes{StoreCode}{ThemeName}, offering robust support for multi-store and multi-theme functionality.
Launch Storefront¶
To launch the Storefront app, run the following command:
dotnet.exe starts Virto Storefront, loads theme, and connects to Virto Commerce Platform via API. After that, Virto Storefront is ready to open in the browser.
Troubleshooting and Technical Configurations¶
Below you will find common issues and the necessary adjustments to optimize the deployment and functionality of Virto Storefront.
Configure Storefront CMS Content¶
Based on your deployment schema, you can configure content storage. Storefront appsettings.json file contains ContentConnectionString setting with pointed to the folder with actual themes and pages content:
...
"ConnectionStrings": {
//For themes stored in local file system
"ContentConnectionString": "provider=LocalStorage;rootPath=~/cms-content"
//For themes stored in azure blob storage
//"ContentConnectionString" connectionString="provider=AzureBlobStorage;rootPath=cms-content;DefaultEndpointsProtocol=https;AccountName=yourAccountName;AccountKey=yourAccountKey"
},
...
Run Storefront on HTTP Schema¶
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.
Run Platform on HTTPS Schema¶
-
Install and trust HTTPS certificate:
-
Run the following command to start VirtoCommerce Storefront with HTTPS:
-
Trust the .Net Core Development Self-Signed Certificate.
Trusting self-signed certificate
Failed to Bind to Address http://127.0.0.1:5000: Address Already in Use Exception¶
This occurs when no ports are specified, which makes Kestrel bind the connection to http://localhost:5000 and https://localhost:5001. These ports might be already used by the platform application. To resolve this, use different ports for the Storefront application:
Forward Scheme for Linux and Non-IIS Reverse Proxies¶
Apps that call UseHttpsRedirection
and UseHsts
put a site into an infinite loop if deployed to an Azure Linux App Service, Azure Linux virtual machine (VM), Linux container, or behind any other reverse proxy besides IIS. The TLS is terminated by the reverse proxy, without Kestrel being aware of the correct request scheme. OAuth and OIDC also fail in this configuration because they generate incorrect redirects.
UseIISIntegration
adds and configures Forwarded Headers Middleware when running behind IIS; however, there is no matching automatic configuration for Linux (Apache or Nginx integration).
To forward the scheme from the proxy in non-IIS scenarios, set the ASPNETCORE_FORWARDEDHEADERS_ENABLED
environment variable to true.
Configure ASP.NET Core to work with proxy servers and load balancers