Search code examples
.netredissitefinity

How do I edit Redis connection string without actually being able to go to the admin?


I have a sitefinity instance set up in Azure App Service. I have a problem with the Redis connection string.

When I navigate to /Sitefinity to get to the admin portal, I'm getting this error.

Connection with Redis could not be established. Check the connection string and try again.

at Telerik.Sitefinity.LoadBalancing.RedisSystemMessageSender.StartRedisReceiver() at Telerik.Sitefinity.Abstractions.Bootstrapper.SetupNLBComunication() at Telerik.Sitefinity.Services.SystemManager.Initialize() at Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes() at Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() at Telerik.Sitefinity.Web.SitefinityHttpModule.<>c.b__4_0(Object ctx)

To fix this I need to go into the admin portal and change my Redis setting, but I can't get into the admin portal without fixing the Redis connection string.

How I fix my site?

enter image description here


Solution

  • The value of the redis connection string is stored either in the file system, under App_Data / Sitefinity / Configuration / SystemConfig.config

    or in the database, where you can use this query to get it:

    select * from sf_xml_config_items
    where path = 'SystemConfig.config'
    

    After you find and update it, make sure to restart the site.