How can I get the current Sitecore Role in my c# code like Standalone
, ContentManagement
or ContentDelivery
?
1 Answer
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" />