Pages

Tuesday, July 7, 2015

Failed to create the configuration database. System.ServiceProcess.TimeoutException was thrown in SharePoint 2013

Problem

I was installing SharePoint 2013 SP 01 in a client’s machine and I got System.ServiceProcess.TimeoutException exception thrown when the configuration wizard trying to creating the configuration database. The screenshot attached below.

21

When I noticed in services the “SharePoint Tracing Service (SPTraceV4)” being stuck on stopping state.

Solution

Step 01. Right click on services and open the properties
Step 02. Changed the Recovery as shown below. 

689550
Step 03. Kill the wsstracing.exe (This is the name of the windows service for SharePoint tracing service) using task manager.

Conclusion

When I killed the process the process started automatically and as the same other process also started as needed.
The installation was a success.
Please check the below link for the conversation regarding tis post which took place in msdn.
https://social.technet.microsoft.com/Forums/office/en-US/fe3572a1-af49-493b-af5b-f1de0ab5ea4c/sharepoint-tracing-service-sptracev4-stuck-on-stopping-when-installing-sharepoint-2013?forum=sharepointadmin#04678991-a3fd-45d6-8102-16eedf5d7c37

Tuesday, June 9, 2015

How to get SharePoint User by User Id in JavaScript using JSOM

Solution

  1. function getUserById() {
  2.  
  3.     var context = new SP.ClientContext.get_current();
  4.     var user = context.get_web().get_siteUsers().getById('1073741823');//Give the user id here
  5.     context.load(user);
  6.     context.executeQueryAsync(
  7.          Function.createDelegate(null, ensureUserSuccess),
  8.          Function.createDelegate(null, onFail)
  9.     );
  10.  
  11.     function ensureUserSuccess() {
  12.         //You can access the properties here
  13.         alert(user.get_title());
  14.         alert(user.get_loginName());
  15.     }
  16.  
  17.     function onFail() {
  18.         alert('Fail');
  19.     }
  20. }

Thursday, May 14, 2015

Web Designer Galleries section is missing on SharePoint Online

Problem

Recently I had to create a trial Office 365 account for a demo purposes. But there are some sections such as “Web Designer Galleries”, “HTML Field Security”, “SharePoint Designer Settings” (under Site Collection Administration section) were missing on the setting page of the SharePoint site.

Also I was not able to upload JavaScript file in my document libraries. 

So here are the steps for resolving the issue.

Solutions

Method 01

Step 01: Go to Admin panel

image

Step 02: Go to SharePoint admin center by selecting SharePoint from the left navigation

 001Step 03:  There go to the setting page

002Step 04: From there allow Custom Script

image

There is a  note saying “changes to this setting might take up to 24 hours to take effect.” So here is the power shell command to do that for immediate effect.

Method 02

Step 01: Open the SharePoint Management shell

Step 02: Type the below command to connect with SharePoint Admin Center in management shell. You have to replace your admin center url which is in line 1.

  1. $spadminurl = "https://suhailj-admin.sharepoint.com/"
  2. connect-sposervice -url $spadminurl

Step 03: You will be asked to enter user name and password.

image

Step 04: Enter the below commands. You have to mention your site collection url where you need the sections.

  1. $spsiteurl = "https://suhailj.sharepoint.com"
  2. Set-SPOsite $spsiteurl -DenyAddAndCustomizePages 0

 

Conclusion

Immediately you can see the web designer galleries in setting page; and I was able to upload JavaScript files in my document libraries.

image

Sunday, May 3, 2015

Happy to share my knowledge with A/L students

Happy that I was able to share my knowledge on Database Normalization with current A/L students from Maruthamunai. The seminar was organized by Kalmunai IT Hub and Maruthamunai Online. 


AL2015 (1)AL2015 (2)AL2015 (3)

Tuesday, April 7, 2015

Retrieve form urls in JSLink (NewForm.aspx | DispForm.aspx | EditForm.aspx) in SharePoint Online and in SharePoint 2013

 

Problem

I had a requirement to add a link tag where the url redirects to Display form of a item. I was rendering the view using JSLink.

Read my previous posts on JSLink on http://jsuhail.blogspot.com/search/label/JSLink

Solution

Display Form Url

var url = String.format('{0}&ID={1}', ctx.displayFormUrl, ctx.CurrentItem.ID);

Edit Form Url

  1. var url = String.format('{0}&ID={1}', ctx.editFormUrl, ctx.CurrentItem.ID);

New Form Url

ctx.newFormUrl

Thursday, December 18, 2014

Add webpart to page through module (Elements.xml) in SharePoint

Introduction

There are several ways to add pages into SharePoint page. To day i will illustrate how to add a webpart to SharePoint page through modules using Elements. xml file.

Solution

Step 1: Add a page into Visual Studio SharePoint solution. You can use this post how to do it.

You need a webpart zone to add a webpart, and according to my post the webpart zone ID is WebPartZoneSearch

Step 2: Then create a webpart as your wish.

Then the solution will be looking something like this.

image

Step 03: Open the Elements.xml file which is inside Module1 and you have to modify it something like this.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  3.   <Module Name="Module1">
  4.     <File Path="Module1\ApplicationPage1.aspx" Url="Module1/ApplicationPage1.aspx" >
  5.       <AllUsersWebPart WebPartOrder ="0" WebPartZoneID ="WebPartZoneSearch">
  6.         <![CDATA[
  7.           <webParts>
  8.             <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
  9.               <metaData>
  10.                 <type name="SitePages.WebPart1.WebPart1, $SharePoint.Project.AssemblyFullName$" />
  11.                 <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
  12.               </metaData>
  13.               <data>
  14.                 <properties>
  15.                   <property name="Title" type="string">WebPart Title</property>
  16.                   <property name="Description" type="string">WebPart Title</property>
  17.                                       </properties>
  18.               </data>
  19.             </webPart>
  20.           </webParts>
  21.         ]]>
  22.       </AllUsersWebPart>
  23.     </File>
  24.   </Module>
  25. </Elements>

Changes for your code:

Line No 05: You have to add the WebPartZoneID which is from aspx page.

Line No 10: Full Assembly name of your webpart.

Please change both according to your solution.

Conclusion

You can add other property like chrome type through Elements.xml file as well.

Please find the solution here, which may helpful to you. 

https://drive.google.com/file/d/0ByEnOE8DAdvheEJaY1RUSkdEM28/view?usp=sharing

Saturday, November 29, 2014

Scrum + Planning Poker + Code Clone Detection in Visual Studio 2012 – Presentation

Today I got a chance to present on three topics during the “System Analysis and Design” course mode of my MSc in IT course. It was very interactive during the presentations. So I would like to share the presentations on the topics.. I would like to thank my lecturer Mr. Chaman Wijesiriwardane for giving me the opportunity.

Scrum Software Development Methodology

 

Planning Poker estimating technique

Code Clone Detection in Visual Studio 2012