I need a way to determine the version of SharePoint based on the URL provided. Also, I need to have it implemented through SharePoint web services or any other method that does not involve SharePoint's object model (because the code is not executed on the server). Could anyone help please? Thanks.
To achieve this you can execute a web request to your SharePoint URL and then capture a host header.
There is a host header called MicrosoftSharePointTeamServices that will provide you with the SharePoint version.
See below:
using System;
using System.Net;
class C {
static void Main(string[] args) {
var uri = new Uri(args[0]);
var wc = new WebClient();
wc.UseDefaultCredentials = true;
wc.DownloadString(uri);
var sharePointVersion = wc.ResponseHeaders["MicrosoftSharePointTeamServices"];
Console.WriteLine(sharePointVersion);
}
}
Then compare your SharePointVersion with the following list:
12.0.0.6535 MOSS 20071 or WSS 3.0 SP2 + December 09 cumulative Update (KB960010 + KB960011)
12.0.0.6524 MOSS 20071 or WSS 3.0 SP2 + 15th December Update (KB977027 + KB977026)
12.0.0.6520 MOSS 20071 or WSS 3.0 SP2 + October 09 cumulative Update (KB974989 + KB974988)
12.0.0.6514 MOSS 20071 or WSS 3.0 SP2 + August 09 cumulative Update (KB973400 + KB973399)
12.0.0.6510 MOSS 20071 or WSS 3.0 SP2 + June 09 cumulative Update (KB971538 + KB971537)
12.0.0.6504 MOSS 20071 or WSS 3.0 SP2 + April 09 cumulative Update (KB968850 + KB968851)
12.0.0.6421 MOSS 20071 or WSS 3.0 SP2 (KB953338 + KB953334) [Updated 1st Aug 09: SP2 download now includes the hotfix (KB971620) that corrects the activation issue more information on the Microsoft SharePoint team blog]
12.0.0.6341 MOSS 20071 or WSS 3.0 February 09 cumulative Update (KB961755 + KB961756)
12.0.0.6335 MOSS 20071 or WSS 3.0 December 08 cumulative Update (KB960010 + KB960011)
12.0.0.6331 MOSS 20071 or WSS 3.0 October 08 cumulative Update (KB957691 + KB957693,KB958567 and KB958569)
12.0.0.6327 MOSS 20071 or WSS 3.0 August 08 cumulative update (KB956056 & KB956057)
12.0.0.6318 MOSS 20071 or WSS 3.0 Infrastructure Update (KB951695 & KB951297)
12.0.0.6303 MOSS 20071 or WSS 3.0 post-SP1 hotfix (KB948945)
12.0.0.6301 MOSS 20071 or WSS 3.0 post-SP1 hotfix (KB941274)
12.0.0.6300 MOSS 20071 or WSS 3.0 post-SP1 hotfix (KB941422)
12.0.0.6219 MOSS 20071 or WSS 3.0 SP1
12.0.0.6039 MOSS 20071 or WSS 3.0 October public update
12.0.0.6036 MOSS 20071 or WSS 3.0 August 24, 07 hotfix package
12.0.0.4518 MOSS 20071 or WSS 3.0 RTM
12.0.0.4407 MOSS 20071 or WSS 3.0 Beta 2 TR
12.0.0.4017 MOSS 20071 or WSS 3.0 Beta 2
12.0.0.3111 Office 12 (PDC image - pre-beta) - This version of Office does not have a support link in the Add/Remove programs dialog box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With