Develop locally against a remotely hosted Sitefinity CMS
Overview
The preferred way for developing with a ASP.NET Core Renderer is to host Sitefinity CMS remotely on a shared IIS instance or App Service. This allows you to take advantage of the benefits that the .NET SDK and the ASP.NET Core Renderer– cross platform development, fast startup, fast build time, modern and robust technology stack.
Because in this scenario there are no or little changes to Sitefinity CMS, you can maintain it separately and upgrade it using the Sitefinity CLI.
RECOMMENDATION: We recommend connecting Sitefinity CMS to a replica of the live database, so that you always test your changes against the latest database. This way you focus only on the frontend development, which is very lightweight and fast.
Run the Renderer locally
On each development machine, you can run the Renderer either through Visual Studio or Visual Studio Code. You can use any platform, supported by the .NET SDK.
You can run the Renderer either on HTTP or HTTPS.
- You set up this in the
launchSettings.json
file.
- Use the
commandName: “Project”
profile. Use the “applicationUrl” variable to specify the URLs where the Renderer app will run.
- If you choose to host on HTTPS, which we recommend, you must install the Microsoft development certificate.
This is done automatically when using Visual Studio (with a prompt) or through the command line using the command:
dotnet dev-certs https –trust
- After which restart your browser.
Test multisite locally
If you want to test multiple sites locally with their live domains, the you can set the default site in the CMS. Alternatively, you can host the Renderer in IIS locally and test the sites there.
For more information, see Preview multisite sites locally.
Host Sitefinity CMS remotely
For more information about hosting Sitefinity CMS, see the following: