Get site name

Hi

How can you get the site name in an event server plugin (as specified in the management client)?

You can use -

Item siteItem = EnvironmentManager.Instance.GetSiteItem(EnvironmentManager.Instance.MasterSite);

The item you get is the “site” item and has the name corresponding with the property you have highlighted in your screen capture from the Management Client.

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_environment_manager.html&tree=tree_search.html?search=getsiteitem

One way to see it in action is to run the ConfigDump sample (in Event Server) and inspect the MIP log. (The log file will per default be at [C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Event Server\logs\MIPLogs)

https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/configdump/readme.html&tree=tree_1.html

Thanks!