Posts

Showing posts from April, 2017

SharePoint Prerequisite installer failing "please check your internet connection"

Image
Sometimes you may get prerequisites components download error while installing SharePoint 2013/2016 prerequisites. Especially first component that is SQL Server Native Client. In the log file, you may see following error. I have faced this issue while installing SharePoint 2016 on three farms. Error: The tool was unable to download Microsoft SQL Server 2012 Native Client. Please check your Internet connection and try again. There is a simple fix for this. Just follow below steps to overcome this issue. 1.  On the server, open IE and go to www.microsoft.com . You should get at least 1 pop up box that say "Content from website listed below is being blocked by Internet Explorer Enhanced Security Configuration".  Uncheck the box that says "Continue to prompt when website content is blocked" 2.  Open IE settings (gear) > Internet Options > Security tab. Click on trusted sites. In the zones, Click sites and then type https://*.microsoft.com to the truste...

SharePoint 2013 Workflows and Workflow Status Column

Image
SharePoint 2013 type workflows developed using SharePoint designer does not show internal status values (Inprogress, Started, Suspended, Completed) rather stage information would be shown in the Workflow Status column and the same workflows when developed using Visual Studio, empty values will be shown. We can resolve this issue using SetWorkflowStatus action. Using this action we can set internal status values or custom values for designer workflows and valid status values for Visual Studio workflows. Since SetWorkflowStatus action is a designer action, it does not available for Visual Studio workflow by default. To enable this action, we have to add following assembly in the toolbox. Microsoft.SharePoint.WorkflowServices.Activities.dll It is located at  C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\WorkflowActivities Then drag the action and set the required value.

C# expressions supported by Visual Studio Workflow

Visual Studio declarative workflows (SharePoint 2013/2016/Online) supports limited C# expressions only. You can't use most of .NET classes, methods, properties and enums, but some of the methods are available. Here is the list of methods and properties available for String class: Contains EndsWith Equals IndexOf Length Replace StartsWith Substring ToLower ToLowerInvariant ToString ToUpper Trim You can find a list of supported methods and properties for DateTime class below. Add AddDays AddHours AddMilliseconds AddMinutes AddMonths AddSeconds AddYear CompareTo Equals Hour Kind Minute Month Second Subtract ToString Year

Application pool stops automatically in IIS

Application pool stops automatically when we browse web application. It can happen mostly in following two cases. 1. Application pool account might have expired. 2. Enable 32-Bit Applications (Application pool setting) must have set to True . It should be False . 

Activity could not be loaded because of errors in the XAML

Image
Recently I have started creating SharePoint 2013 workflows using SharePoint Hosted Apps. I created and tested the workflow successfully. But suddenly workflow designer displaying following error when I have reopened the workflow. I was able to resolve this issue by adding following reference. Microsoft.SharePoint.DesignTime.Activities.16.0.Design Not sure why it was not added automatically.

Fix Designer error: Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.

Image
When I tried to create 2013 workflows using SharePoint designer I got this error.  For some reason, I guess designer failed to download required DLLs into Cache folder. I tried different solutions suggested in various blogs but nothing worked for me except below approach. Copy following files manually to the locations mentioned below. Microsoft.SharePoint.WorkflowServices.Activities.Proxy.dll Microsoft.Web.Design.Client.dll for  SharePoint Online , you have to copy these files at below location. %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\Clients\< VersionNumber > for SharePoint On-premise , you have to copy these files at below location. %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\< SiteName >\< VersionNumber > I am not sure whether it is a right approach or not. Because in future if Microsoft releases new version of above DLLs, we may have to copy latest files again.

Create Self-Signed certificate for a domain

The following PowerShell script can be used to create self-signed certificate for specific domain or sub domain. New-SelfSignedCertificate -DnsName mysite.company.com -CertStoreLocation cert:\LocalMachine\My Then export certificate thru IIS --> Server Certificates and import to Trusted Root Certificates store. Open Manage Computer Certificates on Windows Server 2012 to launch certificates store.

Validate Windows accounts credentials

A simple method to validate windows test/application specific accounts. runas /u:DOMAIN\test_account notepad.exe Once you run the above command it will prompt for credentials. If credentials are valid, it will launch notepad otherwise nothing will be done.

Change Web Part Header Style on SharePoint 2013/2016/Online

Image
To change the Web Part header as below. The following styles will change the WebPart header as curved header. <style type="text/css"> div.ms-webpart-chrome-title { background: #484546; border-style: none; border-top-left-radius: 10px; border-top-right-radius: 10px; padding-left: 10px; } div.ms-webpart-chrome { border-style: none; } h2.ms-webpart-titleText { color: #fff !important; font-weight: bold; } h2.ms-webpart-titleText a:link,  h2.ms-webpart-titleText a:active,  h2.ms-webpart-titleText a:visited,  h2.ms-webpart-titleText a:hover  { color: #fff !important; } .ms-wpContentDivSpace { margin: 0; } div.ms-webpart-chrome { border-color: #eee; border-top-style: none; } tr.ms-viewheadertr {background-color: #f2f2f2;} </style>

Hide quick launch/Left navigation for SharePoint 2013/2016/Online

<style type="text/css"> .ms-core-navigation { DISPLAY: none } #contentBox { margin-left: 10px } </style>

Calendar WebPart Width and Height

The following styles will change the Calendar Web Part width and height based on Web Part Zone dimensions. <style type="text/css"> .ms-acal-item { height: 10px !important; } .ms-acal-item { width: 20px !important; } .ms-acal-sdiv,  .ms-acal-mdiv,  .ms-acal-ctrlitem,  .ms-acal-month-weeksel,  .ms-acal-title,  .ms-acal-vlink a { display:none; } .ms-acal-month-top span { display: none; } .ms-acal-summary-itemrow TD DIV { height: 20px !important; } .ms-acal-week-top td.ms-acal-hover div, .ms-acal-summary-dayrow td.ms-acal-hover div, .ms-acal-summary-dayrow th.ms-acal-hover {  pointer-events: none !important;  cursor: default !important;  } .ms-acal-weekgroup-top td.ms-acal-hover div { pointer-events: none !important; cursor: default !important; } .ms-acal-summary-dayrow > th { pointer-events: none !important; cursor: default !important; } .ms-acal-summary-dayrow td.ms-acal-hover div, .ms-acal-summary-da...