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:

JuneBlogPicture1

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:

JuneBlogPicture2

 

Advertisements


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 }
</style>

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';
}

_spBodyOnLoadFunctionNames.push(“HideBrandingsuite”);
</script>

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();

    try{    
	var oFrame    =    document.all("iframePage");
	oFrame.style.height = f_clientHeight()*0.97;
        oFrame.style.width = f_clientWidth();
        if(oFrame.style.display=="none") {
          oFrame.style.display="block";
         }

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

}

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

if (window.addEventListener)
    window.addEventListener("resize", resizeCaller, false)
else if (window.attachEvent)
    window.attachEvent("onresize", resizeCaller)
else
   window.onresize=resizeCaller
</script>

//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.

Managed_Metadata_SP2013

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.


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:

CrossSite1

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:
http://blogs.technet.com/b/tothesharepoint/archive/2013/02/19/an-introduction-to-cross-site-publishing.aspx
http://blogs.technet.com/b/tothesharepoint/archive/2013/02/14/how-to-set-up-a-product-centric-web-site-in-sharepoint-2013.aspx
http://sympmarc.com/2013/05/13/sharepoint-2013s-search-continuous-crawl-an-enigma/
http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2013/04/01/cross-site-publishing-alternatives-in-sharepoint-online-office-365.aspx
http://www.sharepointnutsandbolts.com/2012/10/using-content-search-web-part-and.html


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:

http://blogs.technet.com/b/christwe/archive/2012/11/02/sharepoint-tidbit-sharepoint-2013-device-channels.aspx
http://msdn.microsoft.com/en-us/library/jj862343.aspx
http://blogs.perficient.com/microsoft/2012/07/mobility-in-sharepoint-2013-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:

http://blog.pixelmill.com/1291/responsive-web-design-for-sharepoint-2013-and-sharepoint-2010/

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.

http://responsivesharepoint.codeplex.com/


Leave a comment

SharePoint 2013 What’s New

SharePoint Foundation 2013 Preview

http://www.microsoft.com/en-us/download/details.aspx?id=30345

SharePoint Server 2013 Preview

http://technet.microsoft.com/en-US/evalcenter/hh973397.aspx?wt.mc_id=TEC_121_1_33

SharePoint Preview Site

http://sharepoint.microsoft.com/en-us/Preview/default.aspx

SharePoint 2013 Requirements

http://sharepoint.microsoft.com/en-us/Preview/sharepoint-requirements.aspx

SharePoint Designer 2013

http://www.microsoft.com/en-us/download/details.aspx?id=30346

SharePoint Server 2013 SDK

http://www.microsoft.com/en-us/download/details.aspx?id=30355

Office Web Apps Preview
http://www.microsoft.com/en-us/download/details.aspx?id=30358