Microsoft SharePoint and .NET Technology Insight

SharePoint, .NET, Office365, Windows Azure, TFS, Project Server and SQL Server Technology Insights

Leave a comment

Adding a new Server to a SharePoint 2013 Farm and SQL Alias

I recently had a requirement to add a new server into an existing SharePoint 2013 on-premises server Farm and ran into the following issue while running the SharePoint Products Configuration Wizard on the new server:


Some blogs suggested running the PowerShell Disable-SPSessionStateService on the existing farm to resolve the issue. However, this change did not work for me. I noticed that the new server being added to the existing farm was missing a SQL Alias definition.

The issue was resolved by creating a SQL Alias on the new server using the commands below followed by running the SharePoint Configuration Wizard again:




Leave a comment

Hiding DOM elements within SharePoint Web-Part Pages on SharePoint 2013 On-premises and SharePoint Online

I recently had a requirement to display several Web-part pages on my SharePoint Online Office365 Publishing site as part of seperate tabs within a custom JQuery tab-strip control (which was embedded within a Content Editor web-part page on the Home page of the site). Here are the steps I followed:

1. Used the following CSS changes and JavaScript code within my Web-Part pages to hide all Office365 and SharePoint Online navigation and related DOM elements including the Top navigation, side-bar, Office365 links (News Feed, Onedrive, gear icon etc).

CSS Changes:

<style type="text/css">
    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, 

#s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content, body #s4-leftpanel {display:none !important;}
    .s4-ca{margin-left:0px !important; margin-right:0px !important;}
	.ms-core-sideNavBox-removeLeftMargin{ DISPLAY: none }
    #contentBox  { margin-left: 20px }

JavaScript Changes:

<script language=”javascript”>
function HideBrandingsuite()
  //hide the left upper "office365" logo
  document.getElementById('suiteBrandingBox').style.visibility = 'hidden';
  //hide the top level links to outlook, sites, calendar, people, newsfeed,...
  document.getElementById('suiteLinksBox').style.visibility = 'hidden';
  //hide the name, cog and help
  document.getElementById('suiteBarRight').style.visibility = 'hidden';
  //hide share, follow and edit
  document.getElementById('RibbonContainer-TabRowRight').style.visibility = 'hidden';


2. I then embedded the Custom Web-parts as iFrames into Content Editor Web-parts (instead of Page Viewer Web-part) within the same Web-part page running the Tabstrip Content Editor Web-part followed by including the title of the of Content Editor Web-parts into the JQuery of the Tabstrip Web-part:

<script type="text/javascript">
function f_clientWidth() {
    return f_filterResults (
        window.innerWidth ? window.innerWidth : 0,
        document.documentElement ? document.documentElement.clientWidth : 0,
        document.body ? document.body.clientWidth : 0

function f_clientHeight() {
    return f_filterResults (
        window.innerHeight ? window.innerHeight : 0,
        document.documentElement ? document.documentElement.clientHeight : 0,
        document.body ? document.body.clientHeight : 0

function f_filterResults(n_win, n_docel, n_body) {
    var n_result = n_win ? n_win : 0;
    if (n_docel && (!n_result || (n_result > n_docel)))
        n_result = n_docel;
    return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;

function resizeCaller() {
var h = f_clientHeight();
var w = f_clientWidth();

	var oFrame    =    document.all("iframePage"); = f_clientHeight()*0.97; = f_clientWidth();
        if("none") {

    //An error is raised if the IFrame domain != its container's domain
      window.status =    'Error: ' + e.number + '; ' + e.description;


if (window.addEventListener)
   window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
   window.attachEvent("onload", resizeCaller)

if (window.addEventListener)
    window.addEventListener("resize", resizeCaller, false)
else if (window.attachEvent)
    window.attachEvent("onresize", resizeCaller)

//Embed an iFrame tag with the target page URL below

Leave a comment

Managed Metadata Service or Connection is not available error in SharePoint 2013

I recently ran into issues with the Managed Metadata service on my SharePoint 2013 Central Admin site reporting the following error message related to the Managed Metadata service or connection not currently being available.


There are several online posts with recommended solutions for the above problem including:

  • The Managed Metadata Web Service hasn’t been started on Central Administration
  • The Application Pool has stopped, which may be due to password issues
  • The Application Pool of the Web Application that you are accessing the Term Store from does not have permissions to the Managed Metadata Service Application.
  • The permissions for the following Registry key has changed after deploying the SharePoint June 2013 Cumulative Update:               Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0 

The permissions for the above key should be:

  • RESTRICTED (Local Machine Group) – Read Permissions
  • WSS_ADMIN_WPG (Local Machine Group) – Read and Special Permissions
  • WSS_WPG (Local Machine Group) – Read Permissions 

I verified my SharePoint environment based on all the above recommended solutions including verifying the permissions for the above registry key. However, the issue with the Managed metadata service continued. The final step was deleting the Managed Metadata Service without selecting the option to delete the associated data for the Service application and recreating the service application. But the problem still did not go away. I repeated the deletion of the Managed Metadata service and selected the option to delete the data too followed by recreating the Managed Metadata Service application which fixed the issue and error went away.

Leave a comment

Windows Azure Point to Site VPN

I recently ran into issues with my Azure point-to-Site VPN client while connecting from my local machine to a shared drive on one of my Azure IAAS VMs. The error which shows up on using the Windows Azure Point-to-Site VPN client was:

Custom script (to update your routing table) failed (80070490).

I ended up deleting and recreating the Gateway defined on the Windows Azure Virtual Network using the Azure Management Portal followed by downloading and installing a new copy of the Point to Site VPN client for the Virtual Network from the Management Portal. The issue went away and I was able to successfully connect from my local machine to my Window Azure IAAS Virtual Network including connecting to Shared drives on my Windows Azure IAAS VMs using the internal IP address of the VMs.

1 Comment

SharePoint 2013 and Cross Site Publishing

One of the questions we are most frequently asked by users with previous versions of SharePoint is how to access content (library and lists) residing in another site collection. Previously, this could only be achieved by using custom code to surface the data or by bending the principles of information architecture to simplify access to the content. SharePoint continues to build out the available tools for Web content management (WCM), including new authoring and publishing capabilities, such as cross-site publishing for managing multiple sites.

The new SharePoint 2013 publishing models allows content authors to write content and surface it in other locations through search. This means content stored within a site collection can be published in a variety of locations, and even tailored for mobile device channels. And, as cross site publishing removes the site collection barrier, content can now be disseminated across web apps and farms, as well as site collections. The following technet diagram highlights provides a overview of the cross site publishing feature:


Cross-site publishing’s a publishing method. It lets you create and maintain content in one or more authoring site collections, and publish this content across one or more publishing site collections, by using Content Search Web Parts. Cross-site publishing uses search technology to retrieve content. On a site collection where the Cross-Site Collection Publishing feature is enabled, libraries and lists have to be enabled as catalogs before the content can be reused in other site collections. The content of the library or list catalogs must be crawled and added to the search index. The content can then be displayed in a publishing site collection by using one or more Content Search Web Parts.

One question which I am asked quite often is the availability of an option around using the cross-site Publishing Feature to publish Information from an on-premise SharePoint 2013 to a SharePoint-online/Office365 environment. SharePoint Online can’t be deployed hybrid with on-premise SharePoint at present. The cross-site publishing feature can only be used for SharePoint Online alone or on-premise SharePoint alone.

Some benefits of SharePoint 2013 Cross-site publishing feature include:
• The cross-site publishing feature when combined with the new continuous crawl feature of the SharePoint search, allows decreasing the gap between publishing of the content and the moment when it become available in the search index (and those shown to end users). It also gives performance advantages when compared to Content by query web parts which rely on queries to content database being performed synchronously when user loads the page with web part, which in turn consumes server resources, while in search-driven approach queries are done to the search index which already contains crawled content.

• One of the major limitations with prior versions of SharePoint was no support for users to access content across site collections and having to design custom solutions for users to access information across site collection barriers. It wasn’t that getting around these barriers was impossible, but required a custom-build of this type of function into a business’s platform and resulted in more time and greater expense. SharePoint 2013 has this type of functionality right out of the box and allows users to do more with their implementation in less time, which probably ends up costing less in terms of both time and revenue.

• The other benefit of cross-site publishing is that content can be stored in standard lists or libraries rather than requiring end users to populate all web-based content into pages. The feature allows users to focus on the content they want to maintain without requiring additional knowledge or skill sets related to managing publishing pages. It can also provide greater control for system administrators over the content that is displayed on each page. Content publishers will update a list that impacts a single Web Part on a page, rather than being empowered to edit all content on the page.

• Multilingual sites and separation of Authoring and publishing.

However, there are still certain aspects to consider when using this new feature including:

• Cross Site Publishing is dependent on the search crawler and content cannot be published accurately if there is latency in the search crawl process. SharePoint 2013 does provide a new Continuous crawl process which ensures that newly added content is indexed instantaneously by the search crawler. However, there is some lack of information around what happens during the Continuous crawl process if crawl threads get backed up.

• Utilizing the Cross site publishing seems complicated for end users. There are many configuration settings which require a good understanding of the relationships within SharePoint.

• One of the outcomes of using the Cross site publishing feature and SharePoint 2013 search-based publishing model is that it only applies to the content that can be indexed. All other assets such as images or files are not included in the search index and therefore must be made available everywhere where the content from a catalog might be published. For example, sharing published news articles between an intranet and public facing SharePoint sites.
• Cross-site publishing is delivered through search and a number of new features, including list/library catalogs, catalog connections, and the content search web part.  Unfortunately, SharePoint Online/Office 365 doesn’t currently support these features.  However, there are alternatives as suggested in the article by Richard diZerega.

Additional Resources:

Leave a comment

Windows Azure and SaaS, PaaS and IaaS

Software as a Services (Saas):

SaaS is a method of software delivery that allows data to be accessed from any device with an Internet connection and web browser. In this web-based model, software vendors host and maintain the servers, databases and code that constitute an application. This is a significant departure from the on-premise software delivery model. First, companies don’t have to invest in extensive hardware to host the software, and this in turn, allows buyers to outsource most of the IT responsibilities typically required to troubleshoot and maintain the software. The SaaS vendor takes care of it all.

There are a number of Microsoft services that are provided in a SaaS model. Exchange, Lync, and SharePoint online combined make up the Office 365 offering. Microsoft Dynamics is also provided online. The Azure setup also includes some application based SaaS offerings like Service Bus, Access Control Service, the new Azure Media Services, and you could even consider SQL Azure as a SaaS offering.

Platform as a Service:

Platform as a Service (PaaS) provides options for companies who want to build and run custom applications as services. Such companies maybe ISVs, value-added service providers, enterprise IT shops and those who needs custom applications. PaaS offers hosted application servers that have near-infinite scalability resulting from the large resource pools they rely on. PaaS also offers necessary supporting services like storage, security, integration infrastructure and development tools for a complete platform. PaaS is generally suitable for brand-new applications, as legacy applications often require extensive refactoring to comply with sandbox rules.

The Windows Azure offering includes PaaS. The benefit of PaaS is that you (an organization, company, etc.) don’t have to worry about maintaining the server hardware or Operating System on which your application runs. The service automatically handles that for you and it provides a level of fault tolerance / redundancy. The core Windows Azure Platform is made up of compute and storage. Beyond the core compute and storage elements the Windows Azure Platform cloud has the Windows Azure AppFabric and the SQL Azure Relational Database for service bus, security access control, and storage of highly structured data. The AppFabric is made up of two core features; the access control and the service bus.

Infrastructure as a Service:

Infrastructure as a Service (IaaS) is similar to traditional hosting, where a business will use the hosted environment as a logical extension of the on-premises datacenter. The servers (physical and virtual) are rented on an as-needed basis, and the IT professionals who manage the infrastructure have full control of the software configuration. The software composition may include operating systems, application platforms, middleware, database servers, enterprise service busses, third-party components and frameworks, and management and monitoring software.

The Windows Azure offering includes IaaS. Windows Azure Virtual Machines, the Infrastructure-As-A-Service (IAAS) offering, is a big leap for Windows Azure platform. Virtual Machines offer multi-tenant virtualized infrastructure, wherein end user can deploy applications. This specifically simplifies the migration of legacy applications to Cloud, offering more optimization avenues to the enterprise IT.

There are many advantages of deploying SharePoint in the cloud as IaaS. There is no infrastructure to monitor and IaaS also follows a utility service model, or pay-per-use, enabling greater flexibility and enhanced scalability. IaaS decreases the total cost of ownership of SharePoint, as there is no equipment which needs to be purchased or maintained.
Azure Blog Posting1

Additional information here:

1 Comment

SharePoint 2013 and Responsive Web Design (RWD)

Responsive Web Design (RWD) pushes a client-side solution resulting from a combination of JavaScript and CSS and presenting an entirely different page structure to different devices, with some original elements hidden or moved around. RWD involves the use of a variety of grids in the page layout and CSS media queries. The use of media queries provides a flexible design because it moves to the browser the burden of switching on the proper cascading style sheet whenever the size of the window matches one of the provided media types.

SharePoint Server 2013 offers new, optimized viewing experiences across different mobile platforms including a new way for designers to design a site once, and then based on that design render it using different Style Sheets and Master Pages, multiple times.

Resources on Device Channels:

Device Channels look very promising for many users of SharePoint but with the need to create and maintain multiple interfaces for Device Channels to work well, and the fact that there are new mobile devices every month with different screen resolutions, Responsive Design still is the way to go as Eric Overfield points out in this blog posting:

Eric has done some phenomenal work to create a Codeplex solution for modifying a popular responsive design framework namely Twitter Bootstrap. The goal of this project is to provide popular grid and responsive frameworks converted to SharePoint 2010 and SharePoint 2013.