Microsoft SharePoint


SharePoint Online Integration with Dynamics 365 for Operation (D365FO) Upload File / Create Folder

This blog will explain how to create files and folders on SharePoint Online programmatically, using AX7 code (Dynamics 365 for Operations).

Read more


Creating a Share Point List Item in SharePoint Hosted Apps Programmatically

Please allow me to demonstrate how to create a SharePoint list in SharePoint hosted apps programmatically.
Read more


Creating a Site in SharePoint Hosted Apps Programmatically

Please allow me to demonstrate how to create SharePoint site programmatically.

Important things to understand when working with apps for SharePoint are host webs and app webs:

  • Host web is a SharePoint site where the app is installed
  • App web is a special isolated site where the app for SharePoint internal components and content are deployed

Read more


Programmatically Managing SharePoint Permissions in Hosted Apps

Please allow me to demonstrate how to assign Microsoft SharePoint permissions on the site or library programmatically.

Important things to understand when working with apps for SharePoint are host webs and app webs:

  • Host web is a SharePoint site where the app is installed
  • App web is a special isolated site where the app for SharePoint internal components and content are deployed

Read more



The following instructions describe the procedure to clone SharePoint environment from one server to another. The procedure is consisted of the following sections:

  • Server operations
  • Database operations
  • SharePoint configuration
  • Configuring Web Applications
  • Verification of the procedure

Read more


Managing SharePoint:DateTime Control Events from Client-Side

Starting from its 2013 version, SharePoint took a turn from classic ASP.NET approach towards more responsive client-side development in order to provide a richer and modern UI experience. And while this was great for the end users, as well as where the platform is generally heading, it also meant expansion of the JavaScript skill set for SharePoint developers.

Read more


Recycle Bin in Microsoft SharePoint Online

The Recycle Bin becomes a very important component of Microsoft SharePoint Online when you delete an object from you environment. The Deleted object is moved into one of the two Recycle Bins from which it can be safely recovered.

When a user deletes an object on their SharePoint Online site, it moves into the first stage Recycle Bin or the user’s Recycle Bin. If the user has Contribute, Design, or Full Control Permission, the deleted object is available to the user and it can be accessed from the Recycle Bin link on the Quick Launch Bar. The deleted object stays in first stage Recycle Bin until it is purged by user with appropriate permissions, or it is automatically deleted after 30 days.

If a user deletes an object from the first stage Recycle Bin, the object moves to the second stage Recycle Bin or the Site Collection Level Recycle Bin. If the User restores the object from the first stage Recycle Bin, the object is restored to its original location.

When an object gets into second stage Recycle Bin, it is available to users who have Site Collection Administrators role and can be accessed from the Site Collection Administration section, Site Setting page. Deleted objects stay in the second stage Recycle Bin until a site collection administrator deletes it – or it’s automatically deleted after a number of days (up to 30). Any object can be permanently deleted after second stage Recycle Bin – or they can be restored in this stage by site collection administrator to its original location.


Displaying a File, Folder or Web Page in the Page Viewer Web Part

The Microsoft SharePoint Page Viewer Web Part can be used for displaying a Web page, file or folder on a Web Part Page.

Note: You can use the Page Viewer Web Part only in a browser that supports the HTML IFRAME element. Displaying a file or folder requires Microsoft Internet Explorer.

Here are the steps how to do this:

  1. Go to the correct site.
  2. Open Site Actions and select Edit Page.
  3. Click Add a Web Part in the section you want the web part to be displayed in.
  4. Choose the category Media and Content and select Page Viewer Web Part. Click Add.
  5. The Page Viewer Web Part is added to the page. Click the Edit Web Part option in order to link the contents.
  6. A) If you want to display a web page it’s very straight forward. Just select Web Page and type in a URL under Link and the URL will be displayed.

    B) If you want to display a folder, type in a network path to that folder under Link and the folder content will be displayed.

    C) If you want to display a file content, type in a network path to that folder along with the file name under Link (e.g. \sharedmanualsXYZUser Manual XYZ 2013.pdf) and the file content will be displayed.

The file opens either in a separate browser window or inside the Web Part if the application that opens the file supports inline activation for that file in the browser window.


SharePoint Client Object Model for Silverlight: Uploading Files Over 2MB

The commonly used method for uploading files in SharePoint’s Client Object Model API is the Microsoft.SharePoint.Client.SaveBinaryDirect method.

For example, calling:

public static void SaveBinaryDirect(

 ClientContext context,
 string serverRelativeUrl,

 Stream stream,

 bool overwriteIfExists

should be quite enough to get through. However, when it comes to Silverlight, the developer is limited to the Microsoft.SharePoint.Client.Silverlight namespace, and the SaveBinaryDirect method is not available there. The alternative is to use the more straightforward approach by instantiating the FileCreationInformation object and to use it for adding new files to the SharePoint folder, like so:

FileCreationInformation fci = new FileCreationInformation();

File file = list.RootFolder.Files.Add(fci);

However, one would yet again face an issue if the size of the file that needs to be uploaded is larger than 2MB. It is necessary to fully read the file prior to calling the Add method. The following method ensures just that:

private byte[] ReadFully(Stream input)


     byte[] buffer;
MemoryStream ms;

     int read;

     buffer = new byte[input.Length];

     using (ms = new MemoryStream())

           while ((read = input.Read(buffer, 0, buffer.Length)) > 0)


               ms.Write(buffer, 0, read);


          return ms.ToArray();


Now, regardless of their size, the method for uploading files looks like this:

public File UploadFile(string fileName, Stream fileStream, bool overwrite)

    FileCreationInformation fci;
StringBuilder sb;

    File file;

    fci = new FileCreationInformation();

    fci.Content = this.ReadFully(fileStream); //Calling the previous method

    fci.Overwrite = overwrite;

    fci.Url = fileName;

    file = list.RootFolder.Files.Add(fci);

    return file;


Happy coding!


Microsoft SharePoint 2010: The Business Collaboration Platform

The capabilities of Microsoft SharePoint 2010 work together to help your company quickly respond to changing business needs. Using SharePoint 2010, your people can share ideas and expertise, create custom solutions for specific needs, and find the right business information to make better decisions. For IT, SharePoint 2010 helps you cut training and maintenance costs, save time and effort, and focus on higher business priorities.

Whether you deploy the platform on-premises or as a hosted service, the capabilities of SharePoint 2010 work together to help you quickly respond to business needs using data-driven insights and solutions that are faster to develop and deploy.

Deliver the Best Productivity Experience

SharePoint 2010 helps your people be more productive. It offers a familiar Microsoft Office experience so that people can easily access the business information they need to get their jobs done.

  • Faster adoption with a familiar user interface:SharePoint 2010 gives your people a familiar experience with the Microsoft Office Fluentâ„¢ user interface and a set of capabilities that works across the SharePoint and Office product families. With this familiar and intuitive user experience, your people can use their PCs, browsers, and mobile devices to become more productive and efficient.
  • Continued productivity regardless of location: Mobile work isn’t just for the sales force anymore. Today, most companies expect their people to be always on, always connected, even when they’re away from the office. SharePoint 2010 offers a full set of capabilities that can help to increase productivity by giving people access to resources, regardless of the tools or devices they have available.
  • Rapid results with ready-to-use capabilities: SharePoint 2010 helps your people work together better with out-of-the-box personal SharePoint sites”My Sites”and pre-defined site templates (such as team sites and enterprise wikis). Everyone can easily customize their sites with SharePoint Web Parts and the new theming engine, making everyday tasks easier to accomplish.

Cut Costs with a Unified Infrastructure

SharePoint 2010 helps you reduce costs by consolidating intranet, extranet, and Internet sites on a single platform, on-premises or in the cloud.

  • Reduced costs through platform consolidation: SharePoint 2010 offers a rich set of integrated capabilities and a single, scalable platform, helping your company and customers reduce costs in several ways. As people begin to work together better and faster, IT can focus on higher business priorities. Plus, by consolidating solutions on SharePoint, you can be sure that everyone is using the same resources and the right information to make better business decisions.
  • More choice with on-premises and hosted options: Your collaboration platform must be able to scale up and out quickly as your company changes and grows. With SharePoint 2010, you can deploy your environment on-premises or in the cloud, letting you make the decision based on business needs, not technology constraints.
  • Proactive platform management: SharePoint 2010 can help IT save time, effort, and cost. A full set of rich administrative tools makes it easier and faster to manage your platform, freeing you to focus on other critical business needs.

Rapidly Respond to Business Needs

SharePoint 2010 gives you the best of both worlds: out-of-the-box applications and a platform for customized solutions. You can use the features of SharePoint 2010 just as they are or quickly create secure and easy-to-use solutions for specific business needs.

  • More value with existing tools and skills: Connections between SharePoint 2010 and Microsoft Visual Studio® 2010 mean that your development team can create and deploy custom solutions on the fly. Using familiar tools and interfaces, developers can apply their current programming skills to a specific business need and help to solve it, quickly and effectively.
  • Two-way interaction with line-of-business data: SharePoint 2010 allows everyone, regardless of their technical expertise, to interact with information from databases, reports, and business applications such as Enterprise Resource Planning (ERP) systems. What’s more, people can surface the data in their SharePoint sites, analyze it, and make updates to be reflected in the external source itself.
  • No-code custom solutions for specific business needs: With SharePoint 2010, you can quickly create no-code solutions and deploy them in an easy and secure way. From simple sites to complex applications, there’s a code-free solution for almost every business need.

Learn more about Microsoft SharePoint 2010!