• Bob has excellent post explaining ease of using content types and rolling them up with Content Query Web Part:

    http://bobmixon.com/BLOG/archive/2007/10/25/Getting-More-from-the-Content-Query-Web-Part-CQWP.aspx

    Here is the post of customizing CQWP for extending its OOB functionality:

    http://www.heathersolomon.com/blog/articles/customitemstyle.aspx
  • Visual Studio has bunch of extensions that it has released over period to support applications like SharePoint, InfoPath, Office etc.

    When you try to open project that was built by using one of the template provided by this extensions you end up getting error:

    Project type is not supported by this installation.

    Here are the steps you can follow to over come this issue and finding the tool kit that is required by the project:

    1. Open ProjectName.csproj in notepad
    2. Find out node and get Guids and Google it, more than likely you will know exact kit that is required.

    Happy Programming!
  • This post is intented for .NET developers who are new to SharePoint, I will be listing out help ful tools that are available to speed up development and for SharePoint customizations.

    Please add your suggestions and other tools that you know of.

    WSP Builder - Available in CodePlex for building web parts, features and workflows - their plugin for Visual Studio will help you build wsp deployment packages easily.

    U2U CAML Query Builder - This tool is available that will help you build CAML Query that are used for SharePoint Lists for retrieving data

    SharePoint Solution Generator - For building Site Definitions and List Definitions, I have faced issues with this tool for sites with customizations but you definitely want to try this - if it goes through it saves lot of time building custom definitions

    Best Practice Analyzer - Make sure your databases are configured correctly

    SharePoint Comunity Kit - Available on CodePlex has free web parts and other tools

    SharePoint Application Templates - 40 templates available from Microsoft Site
  • Cannot get Membership Provider with name . The membership provider for this process was not properly configured. You must configure the membership provider in the .config file for every SharePoint process.

    Steps to resolve this in IIS 7.0

    When you manually configured web.config entries as you would have done in IIS 6.0, IIS 7.0 does not recognize this membership provider unless it is added by going into IIS Manager >> Site Settings >> Providers >>

    Add both membership provider and role provider entries in .NET Users and .NET Roles in here and above issue is resolved.

    Also make sure this is done in all web applications - Central Admin, Windows Authentication Web App and Extended Web Application
  • This is second post on integrating youtube with SharePoint, in last post I described how to upload video in Youtube, in this post I will go over for retrieving youtube video and set chrome player to play it -

    Here are two methods for setting chrome player to play video by video id:

    void SetChromePlayer(string sVideoID)
    {
    ChromePlayerString = @"

    You need Flash player 8+ and JavaScript enabled to view this video.

    ";
    }

    public string jscript = "";
  • There are number of intergration points between YouTube, Google services through api provided by Google: http://code.google.com/apis/youtube/overview.html

    You will need need Client Id and Developer Key for using Google's data service API, you can apply it from above link. There is also sample code available for reference for .NET developers - http://code.google.com/apis/youtube/code.html#sample_code

    Here is the code snipped for uploading video to YouTube:

    Web Part User Interface Button Upload Code:

    FileUploadField.Value = FileUrl;
    oVideoUploadData = new VideoUploadData();
    Stream iStream = VideoFileUpload.PostedFile.InputStream;
    oVideoUploadData.UploadToYouTube([Title], [Description], [Category], [Keywords],
    iStream, [FileName], _listName, sSiteUrl, sWebUrl);


    ///
    /// Method to upload the video to YouTube from the webpart page
    ///


    public bool UploadToYouTube(string sTitle, string sDescription, string sCategory, string sKeywords, Stream iStream, string fname, string ListName, string SiteUrl, string WebUrl) {
    try
    {
    SPSite CurrentSite = new SPSite(SiteUrl);
    SPWeb CurrentWeb = null;
    CurrentWeb = CurrentSite.OpenWeb(WebUrl);

    YouTubeEntry VideoEntry = new YouTubeEntry();
    VideoEntry.Media = new MediaGroup();
    VideoEntry.Media.ExtensionElements.Add(new Private());
    VideoEntry.Media.Description = new MediaDescription(sDescription);
    VideoEntry.Media.Title = new MediaTitle(sTitle);
    VideoEntry.Media.Keywords = new MediaKeywords(sKeywords);
    MediaCategory category = new MediaCategory(sCategory);
    category.Attributes["scheme"] = YouTubeService.DefaultCategory;
    VideoEntry.Media.Categories.Add(category);
    VideoEntry.MediaSource = new MediaFileSource(iStream, fname, "video/quicktime");
    YouTubeEntry createdEntry = service.Upload(VideoEntry);
    string sUri = createdEntry.Id.AbsoluteUri;
    string[] SlashSplitArray = sUri.Split('/');
    string sVideoId = SlashSplitArray[SlashSplitArray.Length - 1].ToString();
    CurrentWeb.AllowUnsafeUpdates = true;
    SPList CurrentList = CurrentWeb.Lists["" + ListName + ""];
    SPListItem VideoItem = CurrentList.Items.Add();
    VideoItem["Title"] = sTitle;
    VideoItem["Video ID"] = sVideoId;
    VideoItem["Comments"] = sDescription;
    VideoItem["Category"] = sCategory;
    VideoItem["Keywords"] = sKeywords;
    VideoItem["List ID"] = _listid;
    VideoItem["Web ID"] = _webid;
    VideoItem["List Item ID"] = _itemid;
    VideoItem.Update();
    _error = false;
    // } }
    catch (GDataRequestException gdre)
    {
    _exceptionOccured = gdre;
    WriteToEventLog(gdre.Message, EventLogEntryType.Error, "Upload in YouTube");
    _error = true;
    }
    catch (Exception ex)
    {
    _exceptionOccured = ex;
    WriteToEventLog(ex.Message, EventLogEntryType.Error, "Upload in YouTube");
    _error = true;
    }
    finally
    {
    _running = false;
    }
    return _error;
    }




    void SetService(SPWeb CurrentWeb)
    {
    try
    {
    SPList ShareTubeConfigurationList = CurrentWeb.Lists["ShareTube Configuration Settings List"];
    SPQuery ConfigurationQuery = new SPQuery();
    ConfigurationQuery.Query = "";
    SPListItemCollection ConfigurationItemCollection = ShareTubeConfigurationList.GetItems(ConfigurationQuery);
    SPListItem ConfigurationItem = ConfigurationItemCollection[0];
    _developerkey = ConfigurationItem["Developer Key"].ToString();
    _configurationkey = ConfigurationItem["Client ID"].ToString();
    _applicationTitle = ConfigurationItem["Title"].ToString();
    _userName = ConfigurationItem["User Name"].ToString();
    _password = ConfigurationItem["Password"].ToString();
    _itemid = ConfigurationItem.ID.ToString();
    _listid = ShareTubeConfigurationList.ID.ToString();
    _webid = CurrentWeb.ID.ToString();
    string PasswordString = null;
    string Passwordtext = null;
    string[] Passwordstr;
    Passwordstr = _password.Split('#');
    Passwordtext = Passwordstr[1];
    Passwordtext = Passwordtext.Remove(Passwordtext.Length - 1, 1);
    string Passwordstore = Passwordtext;
    Security sec = new Security();
    string DecPassword = sec.Decrypt(ref Passwordtext);
    service = new YouTubeService(_applicationTitle, _configurationkey, _developerkey);
    service.setUserCredentials(_userName, DecPassword);
    }
    catch (Exception ex)
    {
    WriteToEventLog(ex.Message, EventLogEntryType.Error, "SetService error");
    }
    }
  • Here are the steps to programmatically migrate documents from Site Scape Forum (now owned by Novell) to SharePoint -

    1. Make archive copy of site scape forum documents
    2. Parse this archive file and extract meta data propeties
    3. Using SharePoint web services upload this documents to selected SharePoint site

    Points to consider:

    Make a console application that can run on site scape or any other box other than SharePoint.
    Email me if you would like to get this tool
2013 © SharePoint Engine All rights reserved. Developed By Binary Republik