6

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

1 Answer 1

13

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 and acknowledge you have read our privacy policy.

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