Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SPServiceApplication.Properties.count is always 0 while accessing service applications in sharepoint2013

$
0
0

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.



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>