Tag: sharepoint 2013

New-SPEnterpriseSearchIndexComponent could not find part of the path error

When attempting to reorganize your SharePoint 2013 topology you may also want to specify a new path for your search Index. The reason for this might be that you want to have a dedicated drive for a large or busy search index. You can find the general technique for modifying the topology here: http://mmman.itgroove.net/2013/03/changing-the-sharepoint-2013-search-topology/

Looking up the involved New-SPEnterpriseSearchIndexComponent at http://technet.microsoft.com/en-us/library/ff607766(v=office.14).aspx we can see the new file path is designated by the -IndexLocation switch. An example would be:

$serv = "MYSERVERNAME"
$NewIndexPath = "E:SharePointIndex"
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $serv -RootDirectory $NewIndexPath

But wait- if the destination path does not exist on the source server, it will error out with “Could not find part of the path”. At first I thought it was permissions, but having checked that the new destination folder had appropriate permissions (WSS_WPG with modify permissions), I was still scratching my head. It became clear this was a bug, as described on http://office.microsoft.com/en-ca/help/sharepoint-server-2013-known-issues-HA102919021.aspx :

“New-SPEnterpriseSearchIndexComponent checks the existence of RootDirectory in the wrong server

You want to add a new index component to the search topology, and want to specify a non-default root directory for the index files. For example:

**Keith Note: Do not use this PowerShell, it has typos quoted as-is from TechNet. Provided for reference only:

New-SPEnterpriseSearchIndexComponent -SearchTopology $t -SearchServiceInstance $ssi -IndexPartition 1 -RootDirectory ""d:index4"

The cmdlet might fail with the following error message because it incorrectly checks if the indicated root directory exists on the server the cmdlet is run on:

Cannot bind parameter ‘RootDirectory’ to the target. Exception setting “”RootDirectory””: “”Could not find a part of the path ‘d:index4’.”

Workaround You can create the new index component using the following procedure instead:”

$host02 = (Get-SPServer "<Name of server>").Name
$ssa = Get-SPEnterpriseSearchserviceApplication
$t = $ssa.ActiveTopology.Clone()
$ic = (New-Object Microsoft.Office.Server.Search.Administration.Topology.IndexComponent $host02,1);
$ic.RootDirectory ="d:index4"
$t.AddComponent($ic)

Note: In the code snippet on the MS bug report, there are three typos (fixed in the PowerShell shown above)

1. missing space between SP-GetServerName and parameter
$host02 = (Get-SPServer””).Name
should be
$host02 = (Get-SPServer “”).Name

2. double quotes in beginning of the path declaration:
$ic.RootDirectory =””d:index4″
should be:
$ic.RootDirectory =”d:index4″

3. extra quote at the end:
$t.AddComponent($ic)”
should be:
$t.AddComponent($ic)

Note 2: You must permit TCP port 808 through your Windows Firewall on the source and destination servers or the topology move in general won’t work!

Top 10 posts from Tuomi.ca

It’s a drizzly grey Friday morning and i’m not feeling super bloggy today – so I’ve looked to the past and dug up the top 10 blog posts that I feel offer the most value:

User Profile Synch SharePoint 2010 – The Essential Mix
My attempt to humbly leverage the gold standard of Spencer Harbar’s explanations of UPS against the latter-improved TechNet guides, sprinkled in with my own experiences.

The Top 10 Problems With SharePoint Performance Top 10 Lists
I’ve come across lot’s of helpful lists around the net and forums on the topic of performance tuning SharePoint however as time and performance projects march forward it’s clear that this subject, more than most in the already dense realm of SharePoint, deserves a more realistic outlook. The standard lists of performance tuning tips look at the forest for the trees. This list looks at the forest as a melee battle between good and evil and er..  anyhow, read on for some twists on the old tuning bag of tricks

SharePoint 2010 File Size Upload Limits – The Essential Mix
​Clearly there are a lot of articles & posts on net regarding increasing File Size Upload limits in SharePoint. Unfortunately I couldn’t find any one that was comprehensive enough to include ALL the tweaks you need to consider to accomplish the goal, on both the SharePoint and IIS level. So here’s mine.

Claims Based Authentication in SharePoint 2010
My run-down of the fundamentals of Claims Based Authentication in SharePoint. Applicable on to, and heavily focused on, in SharePoint 2013 too.

SharePoint 2007 Anonymous MS Office Document Download Login Prompts
Workaround for avoiding authentication prompts on anonymous SharePoint sites, can be applied to newer SP versions too.

Nintex Custom Actions permissions – Understanding RunWithElevatedPrivileges
Getting head around RunWithElevatedPrivileges, useful for all SP Dev, not just when making Nintex Actions.

Cloud-based SharePoint – Risks & Rewards
My early attempts to be a SharePoint weatherman.

All About OneNote Synching & SharePoint
Getting into the nitty gritty of how OneNote (you are using OneNote, aren’t you?) magically keeps all your thoughts saved, synched and backed up in SharePoint.

SharePoint Calculated Column Formulas
Although fundamentally SharePoint calculated columns support all the functions and formulas that Excel can use, there are a few discrepencies. Here I try and present the biggest, most monolithic library of calculated column formulas on the net.

itgroove 2012 SharePoint Predictions.. Dionne Warwick Strikes Back
Not so much a content based post, but just one that needs to be remembered – “Remember that time when Sean predicted the rise of the Apps?”

Creating SharePoint 2013 Apps – Set the App Domain

To get going with developing SharePoint 2013 apps, you need to first set up an App Domain. I first installed SharePoint 2013, then Visual Studio 2012 RC, then ran the web install to get the SharePoint 2013 development extensions added in. You then fire up Visual Studio, saw the new “Apps” entry in the Office/SharePoint templates for Visual Studio, and created a new project based on the “App for SharePoint 2013” project type.

When you attempt to deploy your app, SharePoint comes back with the error “Failed to install App for SharePoint” in Visual Studio’s Error list. The Output window didn’t show much more than that. When you look in the ULS log for the App’s project name, you get this message:

An App domain must be configured prior to completing this operation

The issue is: before creating an App for on-premise hosting, you need to configure a hosting ‘domain’ for your Apps.

The following MSDN article indicates the PowerShell required to get that sucker wired up:
http://msdn.microsoft.com/en-us/library/fp179923(v=office.15)

However.. Tod Klindt’s post Using PowerShell to Set Up Your App Domain in SharePoint 2013 has a slightly sexier, one-shot one-kill version of the PowerShell steps required:

# Assumes you have a Service App Pool named "Default SharePoint Service App Pool"
$apppool = Get-SPServiceApplicationPool "Default SharePoint Service App Pool"
$appname = "App Management Service"

$dbname = "AppManagement_DB"
# Create the App Management service and start its service instance
$sa = New-SPAppManagementServiceApplication -ApplicationPool $apppool -Name $appname -DatabaseName $dbname 
New-SPAppManagementServiceApplicationProxy -ServiceApplication $sa -Name "$appname Proxy"
Get-SPServiceInstance | Where-Object { $_.typename -eq "App Management Service" } | Start-SPServiceInstance

# Create the Subscription Settings service and start its service instance
$sa = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPool -Name "Subscription Settings Service" -DatabaseName "Subscription_Settings_Service_DB"
New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $sa
Get-SPServiceInstance | where{$_.TypeName -eq "Microsoft SharePoint Foundation Subscription Settings Service"} | Start-SPServiceInstance
# Configure your app domain and location
# assumes path of app.contoso-apps.com
Set-spappdomain -appdomain "contoso-apps.com"
Set-spappSiteSubscriptionName -Name "app"

Interestingly, I ran into the following error on the last step Set-SPAppSiteSubscriptionName -Name “app” -Confirm:$false

Set-spappSiteSubscriptionName : The requested service, ‘http://localhost:32843/ SecurityTokenServiceApplication/securitytoken.svc/actas’ could not be
activated. See the server’s diagnostic trace logs for more information. At line:1 char:1 + Set-spappSiteSubscriptionName -Name “app”+

Note that the name isn’t the same name given in the set-spappdomain step – the above didn’t like the period separator in my app.mydomain.com, so I used just the leftmost subdomain part of my domain.

The error, though, was another surprisingly clear error message. It could be traced to the following error in the Servers Manager > Local Server > Events:

WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/9051906
 Exception: System.ServiceModel.ServiceActivationException: The service '/879afece63b54f95a16f9c9c110b0a24/ProfilePropertyService.svc' cannot be activated due to an exception during compilation.  The exception message is: Memory gates checking failed because the free memory (99291136 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.. ---> System.InsufficientMemoryException: Memory gates checking failed because the free memory (99291136 bytes) is less than 5% of total memory.  As a result, the service will not be available for incoming requests.  To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
   at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
 Process Name: w3wp
 Process ID: 6100

The solution: 8GB RAM did not seem to be enough for this hungry hungry hippo. When I added more RAM (went to 14GB RAM as that’s what was available at the moment), things worked as expected. The Microsoft SharePoint Foundation Subscription Services Application now appears in our Service Applications list:

SharePoint 2013 Technical Resources for Developers – Getting Started

Getting going with 2013 from a Developers perspective:

Physical architecture and logical architecture of SharePoint 2013:
http://technet.microsoft.com/en-US/sharepoint/fp123594

Choose the right API set in SharePoint 2013:
http://msdn.microsoft.com/en-us/library/jj164060(v=office.15).aspx

.NET client class libraries in SharePoint 2013 Preview:
http://msdn.microsoft.com/en-us/library/jj193041(v=office.15).aspx

SharePoint 2013 Portal:
http://social.technet.microsoft.com/wiki/contents/articles/12390.sharepoint-2013-portal.aspx

SharePoint 2013 – Resources for Developers:
http://social.technet.microsoft.com/wiki/contents/articles/12392.sharepoint-2013-resources-for-developers.aspx

SharePoint 2013 – Resources for IT Pros:
http://social.technet.microsoft.com/wiki/contents/articles/12391.sharepoint-2013-resources-for-it-pros.aspx

Enterprise Search Architecture for SharePoint 2013 preview
http://www.microsoft.com/en-us/download/details.aspx?id=30383

SharePoint 2013 preview upgrade process
http://www.microsoft.com/en-us/download/details.aspx?id=30371

SharePoint 2013 How to test upgrade
http://www.microsoft.com/en-us/download/details.aspx?id=30366

SharePoint 2013 Upgrade worksheet
http://www.microsoft.com/en-us/download/details.aspx?id=30370

Topology model for SharePoint 2013
http://www.microsoft.com/en-us/download/details.aspx?id=30377

Database that supports SharePoint 2013 Technical Preview
http://www.microsoft.com/en-us/download/details.aspx?id=30363

Design Sample: Corporate Portal with Host-named Sites for SharePoint Server 2013 Preview
http://www.microsoft.com/en-us/download/details.aspx?id=30362

Design Sample: Extranet with Dedicated Zones for Authentication for SharePoint 2013 Preview
http://www.microsoft.com/en-us/download/details.aspx?id=30368

Backup and Restore SharePoint Server 2013 preview
http://www.microsoft.com/en-us/download/details.aspx?id=30365

SharePoint 2013 preview backup and restore worksheet
http://www.microsoft.com/en-us/download/details.aspx?id=30372

Search Architecture for SharePoint 2013 preview
http://www.microsoft.com/en-us/download/details.aspx?id=30372

SharePoint 2013 Preview: App Overview for IT Pros
http://www.microsoft.com/en-us/download/details.aspx?id=30373

Services on server mapping worksheet for SharePoint 2013 Preview
http://www.microsoft.com/en-us/download/details.aspx?id=30367