3

How can I get the current Sitecore Role in my c# code like Standalone, ContentManagement or ContentDelivery?

8

You can get Sitecore role using this

System.Configuration.ConfigurationManager.AppSettings["role:define"]

This value is stored in appSettings of Web.config

 <add key="role:define" value="Standalone" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.