Posts

Showing posts from October, 2011

value does not fall within the expected range

Image
Did you have the following situation ? Access to the sharepoint list . Operations in any action , then try to contact list again , but this time , and receive the following message value does not fall within the expected range. What to do? You need to refrash the web and the list! Use this code: /// <summary> /// Refresh a List /// </summary> /// <param name="list"></param> /// <returns></returns> public static SPList RefreshList( SPList list) {      return RefreshWeb(list.ParentWeb).Lists[list.ID]; } /// <summary> /// Return the web /// </summary> /// <param name="web"></param> /// <returns></returns> public static SPWeb RefreshWeb( SPWeb web) {      web = new SPSite (web.Site.ID).OpenWeb(web.ID);      web.AllowUnsafeUpdates = true ;    ...

Update SharePoint Master Page with Code (C#)

This time I brought a code which allows you to update SharePoint master page on console project (with C#.Net and not with SPD). We look for a site that starts with "http://moss2007/Test-Base/", check that the masterpage had the old version , and we will update the new masterpage . For this subject, we'll have to save the masterpage on a physical file  (C:). In addition, we have to approve the masterpage. using System; using System.Collections. Generic ; using System.Text; using System.IO; using Microsoft.SharePoint; using Microsoft.SharePoint.Publishing; using Microsoft.SharePoint.Administration; namespace Roi.SharePoint.UpdateMasterPage {   class Program   {     private const string oldMasterPage = "workgroup.master" ;     private const string newMasterPage = "NewMaster.master" ;     static void Main( string [] args)     {       SPWebApplicatio...

Study sharepoint with videos

This time I'll introduce you to learn sharepoint sites with video clips SharePoint 2010 Enterprise Content Management Implementers' Course (technet). SharePoint 2010 for Internet Sites Implementers' Course (technet). Video Center | SharePoint 2010 Development (msdn). SharePoint 2007 How-To App (iPhone) (informmIT). How to study for 70-573 Microsoft SharePoint 2010, Application Development (ybbest). SharePoint 2010 Advanced IT Professional Training (Let's Share Our Expertise). SharePoint 2010 Advanced Developer Training (Let's Share Our Expertise). Video demos and training for SharePoint Server 2010 (technet). TechNet Virtual Labs: SharePoint Products and Technologies (technet). Yours, Roi

Daily alerts do not work at SharePoint

Did you encounter a problem alerts list ? Something strange happened to me ( hurray sharepoint ...). A lerts were working fine - just a list daily alerts stopped working . I really do not know why this list . After searching on google - I realized that take care stsadm commands such problems . All you have to do is make those commands in the order ( and of course replace the http://YOURSITE to your site ) . stsadm -o updatealerttemplates -url http://YOURSITE -f "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\alerttemplates.xml" -LCID 1037 stsadm.exe -o setproperty -url http://YOURSITE -pn alerts-enabled -pv true stsadm.exe -o setproperty -url http://YOURSITE -pn job-immediate-alerts -pv "every 5 minutes" I would like to thank Noam - helped me find the solution and fix the problem. Your, Roi