SharePoint Online Root Site – Customize or not to Customize it.

Some time back, when I was fairly new to Office 365 & SharePoint Online, for the sake of learning I had provisioned a demo site and playing around with it.  At that time, I didn’t know the importance of the SharePoint Online root site and started noticing that my SharePoint instance had started to act weird.  Upon further investigation found that the root/default site is not an isolated site after all, and that its existence is very important to the overall health of all other sites provisioned in that tenant.

The below are some facts as to why its better to leave the root site “untouched” and leave it in its own pristine condition:

  1. Do not ever delete the Root site :  If you ever are required to delete the site or had accidentally deleted it, all other SharePoint sites in that tenant will cease to work.  This is because of the fact that the “default/root” site is used for some kind of authentication mechanism (before allowing users to sign-in to other sites) and that is very important for it to be available at all times.
  2. Missing Site Settings in the Default/Root Site:  In the root site,  if you navigate to “Site Settings” you would notice that some of the most common links would have gone missing such as Themes, Composed Looks, Save as Site Template, Delete Site etc.,  Even though you are the “Global Adminstrator” / “Site Collection Administrator / Owner”, it would still not be available and this is due to the fact that “Custom Scripts” are not enable in Root site”.
  3. Custom Scripts Not Enabled in Root site: By design Microsoft has turned off the option to run “Custom Scripts” in the default site, for the sake of preventing users from adding scripts in their My Sites, which could have ill effects on the overall health of the tenant.  It should also be noted that “My Sites” are dependent on the root site and use the settings as applied on the root site for enforcing it onto itself as well.
  4. Cannot create a Default/Root site using PowerShell : Microsoft has disabled provisioning root sites in SharePoint Online using Powershell and it can only be created through the “SharePoint Admin Center”.
  5. At times, when you try to re-provision a root/default site (which you have deleted for some reason), even after you select the “Permanently delete the site collection from the recycle bin and continue“, it might still throw an error saying that the “A site with that name already exists”.  In such instances, you simply have to wait for 1 or 2 hours for it to complete its pending activities.

Taking into consideration the above effects, its advisable to create new sites and perform customizations on them, rather to work directly on the root site.  Not sure as to why Microsoft documentation doesn’t warn about its effects, but from all practical purpose, its better if we plan the site hierarchy by including a “\sites” or “\teams” in the URL (which gets added when provisioning new sites in the admin center).

2,224 total views, 1 views today

Using Custom Site Templates to provision new site Collections from SharePoint Admin Portal in SharePoint Online

One of the short-comings of SharePoint Online is its inability to provide an option for SharePoint Administrators to perform/avail a site backup.  Too often when we are done with a site and if we wish to have a backup of the site (just in case of restoring it or to create a new site based off on it.. ), its simply not possible in SharePoint Online.

The one other option available is to leverage the “Save as Site Template” option and create a copy of the site template (with/without data), which can then be re-used for provisioning new sub-sites within an existing top level site collection.  However, what if we need to provision a new site from the “SharePoint Admin Center” and use that custom site template?  (as you would have noticed that the “Provision new Site collection” menu doesn’t offer any option to list/pick any custom Site Template in its UI.)

Continue reading

1,291 total views, 1 views today

Office 365 ProPlus – Demystifying the Myths.

Folks who have been tracking Microsoft’s RoadMap Vision for the “Office 365 online” would surely be surprised to see a host of new services (or should I say Jargons) getting added to the bandwagon on a regular basis.  For the sake of those who missed to notice them, here are a few.  Even though I had put them as bullets they do not necessarily mean additional products/services added to the Office arsenal, but some are just added features to make better user experience and achieve more productivity. For instance, the Office graph’s machine learning ability to influence how search results are displayed in Office 365 etc.,

Out of the above list of new rollouts to the Office 365 suite, “Office ProPlus” is an item that should certainly be looked into seriously, as its a paradigm shift from the normal mode of Installing, configuring and maintaining on-premises office applications and certainly is aimed at bridging the gap between the desktop office applications and the cloud based Office 365 solution suite.

Continue reading

918 total views, 1 views today

Install/Configure ASP.NET 5 Environment (DNX, DNVM)

To Install ASP.NET on its own (from a command prompt), we’ll need to first install and configure the environment in which ASP.NET runs, also known as .NET Execution Environment (DNX).  In addition, to setup the DNX we would another tool referred as .NET Version Manager (DNVM), which is used for installing and configuring different versions of the .NET Execution Environment (DNX), depending on whether we need the full .Net Framework or just .Net Core

As a first step, to install DNVM:

  1. Open a new command prompt
  2. Run the below command:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString(''))}"

Now type “dnvm” in the command prompt and you should see something like the below:



As a next step:

To install DNX for .NET Core run:

         dnvm upgrade -r coreclr

To install DNX for the full .NET Framework run:

         dnvm upgrade -r clr


1,174 total views, 2 views today

DNX SDK version ‘dnx-clr-win-x86.1.0.0-beta5’ failed to install. Error when creating a new ASP.NET 5 in VS 2015

After you install VS 2015, when you try to create a new project, on certain machines/desktops you get the below error:

DNX SDK version ‘dnx-clr-win-x86.1.0.0-beta5’ failed to install. The solution will use DNX SDK version ‘dnx-clr-win-x86-1.0.0-beta5’ for this session

The issue is due to the non availability of the powershell 3.0 version in the respective desktop. To solve the error install the PowerShell 3.0 version by following the instructions in the below link:

1,745 total views, no views today

SharePoint 2013 Compatibility with IE 11. (Calendar throwing SCRIPT5009 , SEC7111 errors).

When users access SharePoint 2013 site using IE 11, they often are haunted by the following errors:

SharePoint 2013 calendar SCRIPT5009 and SEC7111 errors

  1. SCRIPT5009: ‘HighlightText’ is undefined
  2. SEC7111: HTTP security is compromised by (null)

In addition, you may also see that the “Edit Page” doesn’t render the page in Edit mode, etc.,

However if you try the same URL in chrome it works fine, which is an irony that the opposite would have been understandable!!!

The issue is due to SharePoint 2013’s incompatibility with IE 11, which can be fixed by performing the following:

GoTo IE 11->Tools->Compatibility View Settings -> “Add your site host name”

The above hack would ensure that the site when rendered uses the IE 10 mode (i.e., run in compatibility mode).

2,817 total views, 1 views today

Retain user permission when migrating from Classic mode (SharePoint 2010 ) to Claims Authentication (SharePoint 2013)

The following is the Powershell command to help migrate a site from SharePoint 2010 Classic Authentication to SharePoint 2013 Claims mode along with Retaining the site Permissions defined for users.

Convert-SPWebApplication -Identity “Your Site URL” -To Claims -RetainPermissions

1,552 total views, 2 views today

Using LINQ, Lambda and Expression Trees in .net

LINQ and Expression Trees

Expression Trees represent code in a tree-like data structure.  In LINQ, expression trees represent structured queries that target sources of data that implement IQueryable<T>.  For example, LINQ to SQL provider implements the IQueryable<T> interface, wherein during run-time, when a LINQ to SQL query is executed the underlying implementation leverages the Expression Tree to convert the LINQ query to a “tree like data structure” and then constructs the required output (which in this case is the SQL query), i.e., translate it into a query language appropriate for the data source.  However, on the contrary, when we use LINQ queries to filter data from objects, it returns an IEnumerable<T> which doesn’t use Expression Trees internally.  For instance if you look at the below IEnumerable<T> interface definition,it doesn’t have an Expression defined in it.

Continue reading

2,332 total views, 1 views today

Script Task – Read / Reuse same Recordset twice in a SSIS yields no records or empty

When using a script task/component in SSIS, we often try to read the data from the recordset using an OLEDBAdapter and fill the dataset, like below :

    DataTable dtValidatedResultset = new DataTable();

    OleDbDataAdapter adapter = new OleDbDataAdapter();

    adapter.Fill(dtValidatedResultset, Dts.Variables["User::InputData"].Value);

(The above code uses Script Task and hence it accesses the variable using Dts.Variables collection.  However if you were to use a Script Component, then you would use the strongly typed Variables collection object and access it as Variables.InputData).

However when you use consequtive Script Tasks or Script Components that try to access and read data from the SAME RECORDSET object, the first time it will work fine, but the second time it will read empty records.  This behavior is due to the fact that the Recordset is an ADODB object and has a record pointer / CURSOR that helps to navigate/move between the records.  Since the first time when the Dataset.Fill is invoked, it would have read all the records from the recordset and would have parked the record pointer at the last record in the recordset.

The next time when the same recordset is used in another Script Task/component, it will not rewind or take the recordset pointer to the first record, but would rather try to read it from its current EOR (End of  Record) position and hence you see your DataTable empty.  The only option is to CLONE the RECORDSET before using it again, which would ensure that the original recordset always stays intact for use any number of times in the package.

11,880 total views, 9 views today