Skip to main content

Posts

Showing posts with the label SharePoint

SharePoint : Update URLs after resotring a content DB of hostnamed site collections

To change or update URLS after resotring a content DB of hostnamed site collections, use stsadm -o renamesite -oldurl http://abc.com -newurl http://abc-uat.com You only need to rename the root hostnamed site collection. It will reflect on the other HNSC starting with the same URL. If you try using Set-SPSiteURL on an HNSC with  same starting url, you will get the error : Could not perform this operation on the site collection http://abc.com. To add a URL for this site collection add a URL to the root host-named site collection at http://abc.com. At line:1 char:1

Correct way to handle exception for Get-SPWeb and Get-SpSite SharePoint PowerShell

Catch block does not work correctly for exceptions from get-spweb and get-spsite without the -ErrorAction Stop parameter.  This code will not print "in catch block"  try{Get-SPWeb 'wrong url'} catch { Write-Host "in catch block" }  correct usage : try{Get-SPWeb 'wrong url' -ErrorAction Stop } catch { Write-Host "in catch block" }

Access Host Web from App web in SharePoint hosted app - Office 365

Here is a snippet to save your day. There are many snippets out there showing you how to do cross domain calls, but none of them complete. Here is a sample to access host web components from a SharePoint hosted app or add in. Keywords: SharePoint, access host web, sharepoint online, JSOM, CSOM, SharePoint hosted app, Office 365. 'use strict'; //URLs var hostweburl; var appweburl; var context; var appContextSite; var factory; var context = SP.ClientContext.get_current(); var appContextSite; var rootweb ; var roleDefinitions ; (function () { $(document).ready(function () { hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl")); appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl")); var scriptbase = hostweburl + "/_layouts/15/"; $.getScript(scriptbase + "SP.Runtime.js", function () { $('#message').append(" Getting Scripts.. "); ...

SharePoint : Access Denied when crawling mysites

Error Message: Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled. Solution 1: Add backconnection host names in the registry under HKLM\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 Add a Multi-String Value with name "BackConnectionHostNames". Add the host names for the sites that are on the local server. Solution 2: Disable loop-back check on the server  ( or add host name to Under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" Create a new 32bit DWORD value "DisableLoopbackCheck" with value as 1 Solution 3: Give your content access account "Retrieve People Data for Search Crawlers" permission on the user profile service application. ...

SharePoint 2013 web application authentication fails

Error: SharePoint 2013 web application authentication fails, prompts for credentials 3 times and displays blank page. Kernel Mode Authentication is not supported in SharePoint Products. I would suggest turning this off. If you want this enabled, there is a workaround s - https://technet.microsoft.com/library/dd573004(office.13).aspx  Change the ApplicationHost.config file to have the bit <windowsauthentication enabled="true" useapppoolcredentials="true">< /windowsauthentication>

SharePoint : Failed to load dependency assembly

A windows update broke search in SharePoint. We could not resolve the error in the server. We have to recreate search service in a new server. You are luck if your search topology has redundancy. Errors in ULS: AssemblyReflector : Failed to load dependency assembly in load context and in load from context. Assembly: BihConsumerInterop System.IO.FileNotFoundException: Unable to find the specified file. Errors in Process Monitor HKU\S-1-5-21-494056553-2953882651-1462924595-7389\Software\Microsoft\.NETFramework NAME NOT FOUND HKU\S-1-5-21-494056553-2953882651-1462924595-7718_Classes\CLSID\{BDEADF26-C265-11D0-BCED-00A0C90AB50F}\InprocServer32 NAME NOT FOUND HKLM\SOFTWARE\Microsoft\.NETFramework\JitLockWrite NAME NOT FOUND

SharePoint 2013 : Error while accessing MySite after changing MySite URL

Error while accessing MySite after changing MySite URL. Solution : Verify permissions on mysite service application for the account used to change the URL. Re enable the service connection to the webapplication. ULS Error: Exception occurred loading user profile (/default.aspx): Microsoft.Office.Server.UserProfiles.UserProfileApplicationNotAvailableException: UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.GetRawPartitionID has null proxy    at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.GetRawPartitionID(SPServiceContext serviceContext)    at Microsoft.SharePoint.Portal.WebControls.ProfilePropertyLoader.get_CurrentPartitionId()    at Microsoft.SharePoint.Portal.WebControls.ProfilePropertyLoader.OnInit(EventArgs e).

SharePoint : Workflow stuck at a stage, on a list with unique permissions

In SharePoint 2013, workflow runs with the users permissions unless it has an app step with elevated permissions. If your list has unique permissions, ensure that your workflow history list and task list have write permissions for the user. Another item to check for are steps in the workflow where the user do not have permissions to do. One instance is if the user has no delete access on the list but there is a step in the workflow to delete an item in the list.  This was not an issue in SharePoint 2010 as the workflow was running as system account. Also, do not make your workflow to depend on or read the last modified date on the item. Because the workflow will change it.

Error while starting VM - Failed to allocate resources while connecting to a virtual network

Solution: Change Network Adapter settings for the virtual machine to "Not Connected", start the VM and change the network adapter to the default one. Error Details: [Window Title] Virtual Machine Connection [Main Instruction] The application encountered an error while attempting to change the state of 'machine_name'. [Content] 'machine_name' failed to start. Synthetic Ethernet Port (Instance ID GUID): Error 'The specified network resource or device is no longer available.'. Failed to allocate resources while connecting to a virtual network. [Expanded Information] 'machine_name' failed to start. (Virtual machine ID GUID) 'machine_name' Synthetic Ethernet Port: Failed to finish reserving resources with Error 'The specified network resource or device is no longer available.' (0x80070037). (Virtual machine ID GUID) 'machine_name' failed to allocate resources while connecting to a virtual network: The...

Excel Power Query : Unable to sign in to SharePoint on premises site

Quick tip: If you are using a computer not connected to a domain and accessing a site which requires domain credentials, you will need to set up windows credentials from control panel.

SharePoint 2013 - Quick edit disabled in list or document library

Recently had an issue where the quick edit button on the document library ribbon menu was disabled or grayed out. Initially i suspected Turns out that there is a setting in the advanced settings to enable it.

SharePoint online menu gone black

If any of you are wondering why your SharePoint online menu suddenly went black, I believe this is from an update rolled out by Microsoft. They have set both the background and foreground to black :) .o365cs-base.o365cst.o365spo button.o365cs-spo-topbarMenuOpen, .o365cs-base.o365cst.o365spo button.o365cs-spo-topbarHover, .o365cs-base.o365cst.o365spo a.o365cs-spo-topbarMenuOpen, .o365cs-base.o365cst.o365spo a.o365cs-spo-topbarHover {     background-color: #000;     border-color: #dedede;     color: #000; } .o365spo.o365cs-nav-contextMenu .o365cs-base.o365cst.o365cs-contextMenu {     background-color: #000; } https://prod.msocdn.com/3.06.5615.1/en-US/css/O365ShellCore.css  Waiting for a fix! Until they roll out a fix, add this to your custom css. And dont forget to clean up later. .o365cs-base.o365cst.o365spo button.o365cs-spo-topbarMenuOpen, .o365cs-base.o365cst.o365spo button.o365cs-spo-topba...

SharePoint 2010 - Adding user to a group throws error in IE 9

SharePoint 2010 - Adding user to a group throws error in IE 9 System.InvalidOperationException: Namespace prefix 'xsd' is not defined. at System.Xml.Serialization.XmlSerializationReader.ToXmlQualifiedName(String value, Boolean decodeName) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDictionaryEntryArray.Read1_Object(Boolean isNullable, Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDictionaryEntryArray.Read2_DictionaryEntry(Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDictionaryEntryArray.Read3_ArrayOfDictionaryEntry() Happens when you force your page to render in IE 9 and higher. There is a detailed discussion here : http://social.msdn.microsoft.com/Forums/en-US/90b3835c-6754-4bb6-9fd4-b74f16f236ff/sharepoint-2010-and-ie9-compatibility?forum=sharepointgeneralprevious

OWA not working after security update

Office web apps for SharePoint 2013 not working after security updates / server patching. After installation of the following security patches, OWA stopped working there by causing issues with SharePoint 2013. Details of ULS logs are provided below. FarmStateReplicator.exe (0x0CD8) Office Web Apps Farm State Error when trying to connect to Farm State Manager service: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http:// /farmstatemanager/FarmStateManager.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal...

SharePoint Search - Restrict result source to a single content type

Ever tried adding a result source in SharePoint to restrict your results to a single content type? The query builder makes it sound easy by giving you options to add a simple filter ContentType "equals" "your content type". Resutls? NONE returned. Finally figured out that manually giving the contentype ID as "Contains starts with" > Manual value does the trick!