This project runs over https which can be configured locally using the .NET SDK:
dotnet dev-certs https --trust
When you clone the repository from Git and you are using Windows you might run
into a problem that Git cannot create files that have really long paths. This
would most likely happen in
src/Kentico.Community.Portal.Web/App_Data/CIRepository
because some of the
sub-folder names are very long.
To fix this issue, enable long path support in Windows with Git configuration, or with Group Policy or a registry key change.
If you have issues with the Admin client Webpack dev server using the ASP.NET
Core dev cert, you might have a cert on the filesystem being used by the webpack
dev server that is no longer trusted. This can be caused by running
dotnet dev-certs https --clean
and then dotnet dev-certs https --trust
. This
will install a new dev cert and the previous cert, which webpack exported, is
no longer valid.
To resolve this you can explicitly run the following commands to re-generate the certificates.
On Windows:
dotnet dev-certs https --format pem --no-password --export-path "$env:APPDATA/ASP.NET/https/kentico-community-portal-web-admin.pem"
On MacOS/Linux
dotnet dev-certs https --format pem --no-password -ep $HOME/.aspnet/https/kentico-community-portal-web-admin.pem
These are the commands that are automatically executed for you if no local certs
exist when starting up the Admin local dev Node.js script (details in
~\src\Kentico.Community.Portal.Admin\Client\webpack.config.js
).
-
Database backups are located in the
.\database
folder-
.bacpac
(database snapshot archive) -
.bak
(data + full transaction logs) -
Note: The database backup listed on the first line of the
.\database\backups.txt
file is the most recent backup and should be used as a starting point for a newly set up project.
-
-
PowerShell
-
Use the
Restore-Database.ps1
script (.bacpac
files only)cd .\scripts .\Restore-Database.ps1 ` -ServerName "<server name>" ` -DatabaseName "<database name>" ` -BacpacFile "<filename.bacpac>" ` -WorkspaceFolder $PWD
-
-
(alternative) Azure Data Studio
- Restore a .bacpac file (data + schema)
- Restore a .bak file
-
(alternative) Add database in SQL Server Management Studio
-
(alternative) Restore a .bak file
-
Launch SQL SSMS
-
Extract backup file might require from .zip
.\database\<database-backup.zip>
-
Restore database
- Right click on 'Databases'
- 'Restore Database'
- Select source 'Device' -> ...-> 'Add'
- Select
.bak
from.\database\<database-backup.bak>
-> OK
-
Add User mapping
- 'Security' -> 'Logins'
- Right click on your account
- 'Properties' -> 'User Mapping' -> tick
Kentico.Community
-> tick 'db owner' -> OK
-
-
(alternative) Using MacOS/Linux
-
Use Docker Desktop to setup a MS SQL Server docker container to run the Xperience by Kentico database
docker run + ` --name mssql2022 + ` --hostname=localhost + ` --user=mssql + ` --env=ACCEPT_EULA=Y + ` --env=MSSQL_SA_PASSWORD=Pass@12345 + ` -p 1433:1433 + ` -d mcr.microsoft.com/mssql/server:2022-latest
-
Unzip the
.bak.zip
in./database
Expand-Archive -Path ./database/Kentico.Community-29.0.3-2024-05-14.bak.zip -DestinationPath ./database
-
Copy the unzip'd
.bak
file into your docker container (using the correct file path)docker cp ./database/Kentico.Community-29.0.3-2024-05-14.bak mssql2022:/var/opt/mssql/data
-
Use Azure Data Studio to restore the
.bak
-> command click "Databases" node under SQL Server -> Restore
-
-
Open
.\Kentico.Community.Portal.sln
OR open folder directly from VS Code.If using VS Code, install all recommended extensions
-
Set your database Connection String in your local User Secrets
-
Disable ReCaptcha validation in your local User Secrets (see settings for ReCaptcha in
appsettings.CI.json
) or supply alocalhost
ReCaptcha v3 key/secret