Monday, June 14, 2010

Content Deployment - Best Practices

 Full content deployment is done only on empty site collection, if we want to deploy the content only for the modifiled pages, content  then we go with incremental deployment.

Content deployment copies content from a source Microsoft Office SharePoint Server 2007 site collection to a destination site collection. The entire source site collection can be copied (full), or a subset of sites can be copied (incremental). In either case, content deployment is incremental by default, deploying only changed pages and related assets (such as images). You can also do a full deployment of all content; however, you should only run a full deployment job on an empty site collection. Also, a Quick Deploy feature supports deployment of a single page by authors

http://blogs.technet.com/b/stefan_gossner/archive/2009/01/16/content-deployment-best-practices.aspx

Saturday, June 5, 2010

http://www.sharepoint-tips.com/search/label/SharePoint%202007

Getting user profile values that support multiple value

if (Profile[this.UserProfilePropertyName].Count == 1)
    return Profile[this.UserProfilePropertyName].Value.ToString();
else
{
    StringBuilder ret = new StringBuilder("");
    UserProfileValueCollection values = Profile[this.UserProfilePropertyName];
    System.Collections.IEnumerator allValues = values.GetEnumerator();
    while(allValues.MoveNext())
    {
        ret.Append(allValues.Current.ToString());
        ret.Append(";");
    }
    return ret.ToString();
}

Monday, May 31, 2010

Allow the code block in sharepoint

In the web.config file in the SharePoint virtual directory contains the following section:
  <SharePoint>
    <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
      <PageParserPaths>
      </PageParserPaths>
    </SafeMode>
    :
  </SharePoint>

     

       
By default the node is empty. You can add nodes to specify the virtual paths where you want to allow server side scripts:
<PageParserPaths>
        <PageParserPath VirtualPath="/pages/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
</PageParserPaths>

       

Where CompilationMode is one of the following values:


       

Always The page should always be compiled (default value)
Auto ASP.NET will not compile the page, if possible. 
Never The page or control should never be dynamically compiled.