Missing server side dependencies - sharepoint

I am getting an alert in Sharepoint Central Admin that The SharePoint Health Analyzer has detected some critical issues.
On checking, I found the alerts like:
[MissingSetupFile] File [Features\xxxx\xxxx\xxx] is referenced 1 times in the database [PROD01_Content_xxxx], but exists only under Microsoft SharePoint Foundation 2010 setup folder. Consider upgrading the feature/solution which contains this file to the latest version. One or more setup files are referenced in the database [PROD01_Content_xxxx], but are not installed on the current farm. Please install any feature or solution which contains these files.
[MissingFeature] Database [PROD01_Content_xxxx] has reference(s) to a missing feature: Id = [f99f774c-6160-4bb6-8519-10e30b02d5b3]. The feature with Id f99f774c-6160-4bb6-8519-10e30b02d5b3 is referenced in the database [PROD01_Content_xxxx], but is not installed on the current farm. The missing feature may cause upgrade to fail. Please install any solution which contains the feature and restart upgrade if necessary.
[MissingWebPart] WebPart class [a9bc1035-cf56-e003-8a4d-fff0bb3da148] (class [Microsoft.Office.Server.Search.WebControls.SearchApplicationSystemStatus] from assembly [Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]) is referenced 1 times in the database [PROD01_SharePoint_AdminContent], but is not installed on the current farm. Please install any feature/solution which contains this web part. One or more web parts are referenced in the database [PROD01_SharePoint_AdminContent], but are not installed on the current farm. Please install any feature or solution which contains these web parts.
I followed the link:
http://get-spscripts.com/2011/06/removing-features-from-content-database.html
But unfortunately, on running the script, it shows the feature does not found.
One thing I would like to mention is: I've deployed the sharepoint 2010 wsp on 2013 version.Is this the reason for getting [MissingSetupFile] error?
What can I do? Any help will be appreciated.
Thanks,

Pay attention to the first message that says "but exists only under Microsoft SharePoint Foundation 2010 setup folder" . This means that you have deployed a 2010 solution into a 2013 farm. But is only installed to 14 hive. for the solution to work properly in the 2013 farm, it needs to be installed to the 15 hive also.
Here is the PowerShell that installs to both 14 and 15 hive.
Install-SPSolution -Identity 'your custom solution.wsp' -GACDeployment -CompatibilityLevel {14,15} -AllWebApplications –force

The link below provides the solution.
Worked for me.
http://sharepointsoldiers.wordpress.com/2013/04/22/sharepoint-2013missing-serverside-dependencies/

Related

SharePoint 2016 - Copying content DB from Prod to Dev

I tried to copy the content DB from Prod to Dev server for the first time in my SP 2016 environment. Both the environments build versions are same (16.0.4705.1000). However in the prod under "Manage Patch Status" I see one extra Feature Pack 2 patch (16.0.4588.1001).
https://support.microsoft.com/en-us/help/4011127/descriptionofthesecurityupdateforsharepointserver2016september12-2017
Now when I am doing Mount-SPContentDatabase, I get the following error.
Mount-SPContentDatabase : An extension defined in the database is not registered with the farm.
In the ULS I see the following information. It says the project server database extensions are missing.
Following are my questions,
Is this because I have installed Feature Pack 2(link above) in Prod which has security updates for Project server? We don't have project server enabled in either of the environments.
Can I install the Feature Pack 2 in Dev now even though it has higher security update already installed? Isn't the later patch includes everything that was released in the previous patches?
This is just for my understanding. In the manage patch status why does the Install Status for feature pack 2 shows as "Superseded" even though I have other later patches?
Tried Restore-SPsite as well but getting error "The extension set does not match."
Had the same problem during the migration from 2016 -> 2019.
My solution:
Register the missing extension https://techcommunity.microsoft.com/t5/sharepoint-support-blog/upgrading-a-content-db-from-sharepoint-2016-to-sharepoint-2019/ba-p/1374209 (look at the bottom of the post)
remount the contentDB
Required code to perform the registration in step 1:
Check extensions in old farm
$contentservice=[Microsoft.sharepoint.Administration.SPwebservice]::ContentService
$contentservice.RegisteredDatabaseExtensionTypes >> SP2016Farm_registered_Extn.txt
Check extensions in new farm
$contentservice=[Microsoft.sharepoint.Administration.SPwebservice]::ContentService
$contentservice.RegisteredDatabaseExtensionTypes >>SP2019Farm_registered_Extn.txt
Register missing extension in new farm
$svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Project.Server.Database.Extension") | FL
$svc.RegisteredDatabaseExtensionTypes.EnsureAdded([Microsoft.Office.Project.Server.Database.Extension.ProjectDatabaseExtension])
$svc.Update($true)
In my case i did the steps below before i have registered the missing extension, but i think/hope there is no need to do that.
Powershell: Enable-ProjectServerLicense (Trail License)
Check running Sharepoint CA > ProjectServer Service
Check/create Sharepoint CA > ProjectServer Application

SharePoint 2010: Setting up a local dev environment from production data - Could not load file or assembly due to invalid PublicKeyToken

I have tried multiple ways to get the production SharePoint content to my newly installed local development environment that is running on a VM Windows Server 2008 R2. After an export of the farm and a restore failed I came across this blog post and followed these instrucitons: http://richardstk.wordpress.com/2012/02/03/build-a-sharepoint-2010-development-test-environment/. To sum up, it's basically backing up the live SQL Content database as well as the Profile, Sync and Social databases, then restoring them on the dev machine and pointing SharePoint to use these new databases instead of the old ones. Then after that I deployed the custom webparts to the development server from within Visual Studio.
I've done this and it seemed to work pretty well. I can access Central Administrator as well as setting up a SharePoint Connection within Visual Studio and being able to see all the pages, lists, documents, etc. So it is definitely pointing to the new content database. I should mention I can also connect via SharePoint Designer and access all the correct content, Master Pages, lists, etc.
The problem I am having is that I am getting a "Could not load file or assembly" error when I go to the site in a browser and it takes me to /Pages/Home.aspx. The file is a custom webpart that I have deployed from within Visual Studio. When I look within the GAC I see the assembly listed but the PublicKeyToken is different from the one that is shown in the error message.
When I dig into it a little more I see that the custom user control is registered in my Master page, and when I look at the ascx file in the _controltemplates directory where it is located there is an Assembly that looks like this:
<%# Assembly Name="BlogRoll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=529e9730fe2a198d" %>
That PublicKeyToken is correct for the live site when I look in the GAC there but when I deployed it to my local GAC it created a new PblicKeyToken. Sorry if I'm rambling but I wasn't sure what was relevant and what wasn't.
I guess my question is how to handle this? It doesn't seem smart to change all the ascx files locally to match the new PublicKeyToken's that I have in the local GAC because then when I deploy these changes to live they won't find the appropriate assembly. What is the best way to handle this?
UPDATE
The code in question has a key.snk file that is being used to strongly sign it. My understanding is that this should make it so that it gets compiled with a specific PublicKeyToken each time and therefore install in the GAC with a specific PublicKeyToken. If that is true, then I believe the only reason it would have a different key token on my dev environment versus the production is that the key.snk file that has been provided is incorrect. Is that true?
You could use WSP Builder or WinGac to forcibly deploy the assembly with the correct PublicKeyToken to your local GAC.

Sharepoint Foundation: "Could not load file or assembly 'Microsoft.SharePoint.Publishing'"

I deployed some solutions to Sharepoint Central Administration.
After this, the Central Administration can't open. this error appear when I try access the site:
Error
Could not load file or assembly
'Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The
system cannot find the file specified.
I saw at some blog this error occur because the solution isn't compatible with sharepoint foundation.
So I uninstalled all solutions from site using PowerShell's Command. But the error persist.
What I need to do to fix it?
I assume you only have SharePoint Foundation installed since you get this error, (and not SharePoint Server).
I would check the web.config of the central admin website for references to 'Microsoft.SharePoint.Publishing'. Probably the custom solutions you installed left some traces there and that's causing your problem. It's not pretty but you'll probably need to remove these references manually.

PreUpgradeCheck Error How to locate reference of Missing Feature

I am migrating sharepoint 2007 publishing site to sharepoint 2010. For migration process I have followed the steps
1. Backup the content database from the SP2007 machine.
2. Restore that database in sql server 2008 (SP2010 machine).
3. Create a new web application in SP2010.
4. I have run the following stsadm command for PreUpgradeCheck in SP2007
I am getting the error log as follows
Error: Missing server file or server configuration issues
Server side files are referenced in the content databases, but are not installed on the server. Without these files, the sites may not function completely or the content may not render correctly. Also, upgrade or post upgrade issues may occur if these files are not available in the new version environment.
The following feature(s) are referenced by the content, but they are not installed on the web server
Name = Unknown, Feature id = f3dc6c9a-ea83-4c22-bdb9-1a3a178717cf, Reference count = 1, Scope = Web, Status = Missing
Name = Unknown, Feature id = a5977882-1fbc-4b94-a345-c9f3dac1b18c, Reference count = 1, Scope = Web, Status = Missing
The link provided below the error explains the issue but doesn't provide any instruction on how to search through the content to find the reference in order to fix it.
For more information about this rule, see KB article 976218 in the rule article list at http://go.microsoft.com/fwlink/?LinkID=120257.
Could anyone provide a solution for this issue ?
You can search the 12 hive location in your 2007 machine to find the missing feature. Do a text search on f3dc6c9a-ea83-4c22-bdb9-1a3a178717cf and the other feature and install it in SharePoint 2010.
You can also use a tool such as SharePoint Manager 2007 to browse all the features and inspect their ID's but doing a text search will allow you to find the missing feature quickly.

SharePoint 2010 Search - The search request was unable to connect to the Search Service

I am using SharePoint 2010 Foundation and I have a prolem with the search on there. Everytime I search for something I get the response of The search request was unable to connect to the Search Service.
I have spent alot of time looking at this and I cannot seem to see what is causing the issue. The SharePoint Foundation Search service is started but there are no services listed on the server for search other than the 'Help Search'.
Also, if I look into my content databases under the 'Manage Database Upgrade Status' it telling me that the database is too old...
Could anyone point me in the right direction as to how to resolve these issues as it is sending me mad!!
Many Thanks in advance...
Luke
Execute this command in SharePoint 2010 Management Shell (run as administrator)
psconfig -cmd upgrade
It will initiate standard SharePoint Products update and upgrade all databases which are in either "version mismatchm, upgrade is recommended" or "old, upgrade is required" status. The tool runs in command line and gives your updates about installation progress, like this.
PS C:\Users\Administrator> psconfig -cmd upgrade
SharePoint Products Configuration Wizard version 14.0.6009.1000. Copyright (C) M
icrosoft Corporation 2010. All rights reserved.
Performing configuration task 1 of 4
Initializing SharePoint Products upgrade...
Waiting to get a lock to upgrade the farm.
Successfully initialized SharePoint Products upgrade.
Performing configuration task 2 of 4
Initiating the upgrade sequence...
Successfully initiated the upgrade sequence.
Performing configuration task 3 of 4
Upgrading SharePoint Products...
Successfully upgraded SharePoint Products.
Performing configuration task 4 of 4
Finalizing the SharePoint Products configuration...
Successfully completed the SharePoint Products configuration.
Total number of configuration settings run: 4
Total number of successful configuration settings: 4
Total number of unsuccessful configuration settings: 0
Successfully stopped the configuration of SharePoint Products.
Configuration of the SharePoint Products has succeeded.
PS C:\Users\Administrator>
After some further research into this I found it was a simple case of needing to upgrade some of my databases (the search database being one of them).
To view the databases that needed upgrading I used the Powershell Commands:
Get-SPDatabase | ?{$_.NeedsUpgrade -eq $true} | Select Name
AND
Get-SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase
This allowed me to identify all databases that needed this (pretty much the same as using the Health Analyzer in Central Admin). I then ran the following PSCONFIG command through the powershell command windows to perform the upgrade:
psconfig -cmd upgrade -inplace -b2b -force -wait
Finally I ran the Products and Technologies wizard and all worked fine (including the search).
This is my experience:
For every time a fresh new install SharePoint 2010, the search service is good and working. When the 2008 server runs the auto update and found some update patches for SharePoint and get loaded automatically, then the SharePoint search will failed afterward with the message "The search request was unable to connect to the Search Service".
It looks like the auto loaded SharePoint patches will so something inference the search service but not do the work in a clean way.
I have used the "psconfig -cmd upgrade" command first but search is not work at first.
Then, I go to Central Administration -> System Settings -> Manage services on server, stop the "SharePoint Foundation Search" service, this will remove all search index. Start it up again. Afterward, the search works again.

Resources