i am trying to get database name and server details of service application(SPServiceApplication)
Basically i need to get properties of Service applications pro-grammatically.
Which we can find on selecting service and properties in the ribbon in central admin.
i am getting services in the farm,when i check for properties always it shows count 0
below is code snippet
var farmServices = SPFarm.Local.Services; foreach (SPService service in farmServices) { SPServiceApplicationCollection serviceApplicationColl = service.Applications; foreach (SPServiceApplication serviceApp in serviceApplicationColl) { servicepp.properties.count //always 0 } }
i need to fetch all properties which we can see in centraladmin - ServiceApplications- Serviceapplication - properties
Please do let me know if any way to get serviceapplication properties programmatically.