Saturday 15 January 2011

How to List all web Applications Under a Sharepoint Server -


Is there a way to get a list of all web applications under a shared point server? I am using C # object, using the client object model to develop applications. So, is it possible to do this with the client object model and how can I do this if possible. Or any other way to do this with the client side

Any help would be appreciated

I am using the server object model .... This can help .............

  foreach (SPWebService.ContentService.WebApplications in SPWebApplication webApplications) {foreach (SPS ite siteCollection in webApplications.Sites) { Foreach (SPWebCollection collWebsite in siteCollection.AllWebs) {SPWebCollection collWebsite = site.AllWebs; Foreach (SPWeb website in collWebsite) {// all web site}}}}    

No comments:

Post a Comment