Posts

Create Responsive Circle

About Let’s see how to create a responsive circle with use of DIV tag in HTML CSS First we need to write some css for the circle: .circle {             margin-left : auto ;             margin-right : auto ;             border-radius : 50% ;             width : 100% ;             position : relative ;             border : 3px solid #D21009 ;             background-color : #d9534f ;         }         .circle:before {             content : "" ;             display : block ;             padding-top : 100% ;         }         .circle-inner {             position : absolute ;             top : 0 ;             left : 0 ;             bottom : 0 ;             right : 0 ;             text-align : center ;         }         .circle-text {             margin : auto ;             position : absolute ;             top : 0 ;             left : 0 ;             bottom : 0 ;             right : 0 ;           

Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site.

I was trying to create SharePoint apps using Visual Studio 2013 & when I tryied to deploy it was showing me an error : The following feature need to be enabled : Display Name: EnableAppSideLoading Id: ae3a1339-61f5-4f8f-81a7-abd2da956a7d Compatibility Level: 15 To enable sideloading feature, use the following PowerShell commands:     $site = Get-SPSite "http://your.site.url" $sideLoadingId = new-object System.Guid "ae3a1339-61f5-4f8f-81a7-abd2da956a7d" $site.Features.Add($sideLoadingId)

Log error in a separate file

You can log your applications errors in separate text file. Use this code public static void WriteException(string msg)         {             try             {                 SPSecurity.RunWithElevatedPrivileges(delegate()                 {                     string LogFile = SPUtility.GetVersionedGenericSetupPath("LOGS",15) + "\\SPErrorLog-" + DateTime.Today.ToString("MM-dd-yyyy") + ".txt";                     StringBuilder sMessage = new StringBuilder();                     msg = msg.Replace("<b>", "");                     msg = msg.Replace("</b>", "");                     msg = msg.Replace("<HR/>", "");                     sMessage.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");                     sMessage.AppendLine(msg);                     if (!

Get error with details

You can log error with all details you want. Here is the example. You need to just pass the exception object & it will return you the whole error details which will be very helpful.   public static string GetErrorInfo(Exception ex)         {             StringBuilder errorRows = new StringBuilder();             StackTrace stackTrace = new StackTrace(ex, true);             StackFrame stackFrame = stackTrace.GetFrame(stackTrace.FrameCount - 1);             MethodBase methodBase = null;             try             {                 methodBase = stackFrame.GetMethod();             }             catch { }             errorRows.AppendLine("<b>Server         : </b>" + System.Environment.MachineName + "<HR/>");             errorRows.AppendLine("<b>Date Time         : </b>" + DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss") + "<HR/>");             try             {                 errorRows.AppendLine("&l

Publishing Features for Site Collection & Web

If you are going to created & deploy the custom master page then you should activate the following publishing features : Display Name PublishingSite Title SharePoint Server Publishing Infrastructure Scope Site ID f6924d36-2fa8-4f0b-b16d-06b7250180fa Description Provides centralized libraries, content types, master pages and page layouts and enables page scheduling and other publishing functionality for a site collection. Display Name PublishingResources Title Publishing Resources Scope Site ID aebc918d-b20f-4a11-a1db-9ed84d79c87e Description Enable Publishing for site collection. Display Name Publishing Title Publishing Scope Web ID 22a9ef51-737b-4ff2-9346-694633fe4416 Description Enable Publishing in a web. Display Name PublishingLayouts Title Page Layouts and Master Pages Pack Scope Site ID d3f51be2-38a8-4e44-ba84-940d35be1566 Description Publishing Lay

Unable to create publishing pages in the pages library in SharePoint 2013

Go to  Original Post   Reproduction Steps: 1) Browse to: https://contoso.com/site/myteam 2) site Actions 3) View All Site Content 4) Pages 5) Library Tools > Documents 6) New Document 7) Page 8) Get an error message saying: An unexpected error has occurred. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 5a3ab0c7-9b95-4c20-a5a7-04637fe0a120 Date and Time: 2013/12/04 04:19:04 PM When you pull the ULS logs you see: Microsoft.SharePoint.Publishing.InvalidPublishingWebException: The site is not valid. The ‘Pages’ document library is missing. at Microsoft.SharePoint.Publishing.PublishingWeb.GetPublishingListWithCleanup(PublishingListType list, Boolean throwExceptionOnInvalidWeb) at Microsoft.SharePoint.Publishing.Internal.CodeBehind.BasePageSettingsPage.get_PageListRoot() at Microsoft.SharePoint.Publishing.Internal.CodeBehind.BasePageSettingsPage.SetParentUrlLabel() at Microsoft.SharePoint.Publishing.Internal.CodeBehind.BasePageSettingsPage.LoadValues() at Micro