SharePoint: How to retrieve specific version of file from a document library thro’ programmatically?

The SPFile.Versions API can be used to retrieve the specific version of the document library.   I have compiled a sample code snippet to retrieve the specific version of the document library.               //Open the web             SPWeb web = new SPSite(“http://karthickmain:9091/sites/siteb”).OpenWeb();             //Get the folder             SPFolder folder = web.Folders[“Shared Documents”];             //Get…

4

SharePoint: How to add news listings to the News Area thro’ programmatically

I compiled a sample piece of code snippet to add news listings to the news area.               //Site object             SPSite site = new SPSite(“http://karthickmain:9090”);             //Get the portal context             PortalContext context = PortalApplication.GetContext(site.ID);             //Get the news area guid             Guid newsGuid = AreaManager.GetSystemAreaGuid(context, SystemArea.News);             //Get the new area             Area…

2

SharePoint: PortalContext – gives “Value cannot be null. Parameter name: site”

I came across the following problem in PortalContext API.   Say I have created a portal with port number 9091. I am using the following code snippet to retrieve the portal context.   [working though we changed the port number] TopologyManager tm = new TopologyManager(); PortalSite ps = tm.PortalSites[ new Uri[http://karthickmain:9091)]; PortalContext ctx = PortalApplication.GetContext(ps);…

1

SharePoint: How to retrieve the list of item from the Sub folders by using Lists.asmx web service

Unfortunately SPS SDK doesn’t provide sample to get the details from the subfolder. I have compiled a sample code snippet to achieve it. Here you go for the code.               localhost.Lists listService = new localhost.Lists();             listService.Credentials = System.Net.CredentialCache.DefaultCredentials;             //url and folder name hard coded – modify it as per your requirement.            …

2

SharePoint : SPWeb.AlternateHeader issue – does not accept empty “” string

Recently I see this problem in SPWeb object. I have configured the alternate header in the onet.xml. I created the sites. Now I want to revert back the alternate header configured and set it to empty. As we know already, what ever the modification made on the onet.xml will be picked up by the newly…

0

MCMS 2002 : List of some important hotfixes for CMS 2002 SP2

912356 – The Web server may stop responding when you try to generate a channel path by using the MCMS API in Content Management Server 2002 913400 – You receive an error message when you try to use SQL authentication mode in the Database Configuration Application (DCA) after you install Content Management Server 2002 SP2…

0

SharePoint : Programmatically access "Manage crawls of Site Directory"

Programmatically access “Manage crawls of Site Directory” The Manage Crawls of Site directory is a Area Listing as like Best Bet Keywords. The following piece of code snippet can be used to access the “Manage crawls of Site Directory” through SPS object model. The crawl is part of DeepCrawl AreaListings. The Status (SiteDate.ListingStatus) property of…

1

SharePoint : Add group of users to the user collection programmatically

The sample code as follows.     SPWeb web = new SPSite(“Site URL”).OpenWeb();    SPUserInfo[] userInfo = new SPUserInfo[1];    userInfo[0].Email = “email@microsoft.com”;    userInfo[0].LoginName = @”domain\username”;    userInfo[0].Name = “username”;    userInfo[0].Notes = “Test”;    web.Roles[“Reader”].Users.AddCollection(userInfo);    

6

SharePoint : .net 2.0 and SQL Server 2005 Supportability

Windows SharePoint Services (WSS) Support for running on 64-bit systems in 32-bit emulation mode Support for reverse proxy Support for IP-bound virtual servers Support for off-box SSL termination Support for Microsoft SQL Server 2005 Support for ASP.net 2.0 http://support.microsoft.com/?id=887624 SharePoint Portal Server 2003 Post SP2 supports SQL Server 2005 but not ASP.net 2.0 http://support.microsoft.com/default.aspx?scid=kb;en-us;907763 Service…

0

SharePoint : Top Area Navigation Drop Down Menu Control

This menu control works based on external JavaScript and CSS file. These files are sample only. Follow the following steps to install the web control into the page. Step 1:  Create Web Control (I know you know all these steps, but just adding bit…) Open Visual Studio.net Create New Visual C# Web Control Library Project….

5