Image rendition issues in SharePoint on premise related to Blob Cache

This issue might occcur in SharePoint on premise versions 2013, 2016 and 2019.

Issue description:

Images do not load properly or load with full size that is without rendition. This can happen if Blob Cache is corrupted on one of the Web Front end or web front ends are not synced between each other.

What is Blob Cache?

A disk based cache which reduces round trip to database to get files such as images, audio or video. Once a file is requested it is copied to a disk for the first time and for subsequent requests file is fetched from dsik rather than database hence reducing load on database. More details here https://docs.microsoft.com/en-us/sharepoint/administration/flush-the-blob-cache

How to enable Blob Cache?

You need to do a change on Web.Config file in IIS, add below line, read more here https://docs.microsoft.com/en-us/sharepoint/administration/cache-settings-configuration-for-a-web-application

BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" enabled="false" />

The default max size for an image when using Image Renditions is 40 mega pixels. Should you want to modify this value you will need to add the imageRenditionMaxSourcePixels parameter. For example: <BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" imageRenditionMaxSourcePixels="100000000" enabled="true" />

Error message: I was not able to identify an error message but users complained that intranet page seems weird and images are displaying over text and etc

How to fix:

  1. Try flushing blob cache with below PowerShell command , this will not recycle the IIS so you can do it during day as well but always good to do it outside office hours.
$webApp = Get-SPWebApplication "<WebApplicationURL>"
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Write-Host "Flushed the BLOB cache for:" $webApp

2. It is not necessary that above will fix the issue, in our case we identified that this did not fix the issue because cache was not getting updated in one of the web front end and time stamp was quite old.

How can you check if it is old and it’s not getting updated?

Visit the folder location of Blob cache on Web front end and each web app will have it’s own folder, check last modified date, you can also compare with other web front ends.

If your issue as explained below then do like this but make sure you have web front end outside of load balancer or you are doing in outside of office hours.

  • Disable blob cache temporarily: You can make the flag false in web.config file of the IIS which has issues, the line in web.conifg looks like below
  • <BlobCache location=”C:\BlobCache\14″ path=”\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$” maxSize=”10″ imageRenditionMaxSourcePixels=”100000000″ enabled=”true” />
  • Do an IISRESET
  • Once done please cut paste the folders inside blob cache folder in case something goes wrong.
  • Then make flag true again and do an IISRESET again
  • Thsi will start loading images in Blob cache again with fresh images and should also fix the issue.

Connect with me on Twitter or Linked In if you need more information.

Impact of Active Directory Migration or domain change on SharePoint, domain migrate SharePoint servers – Part 2

This is part 2 of part 1 written earlier https://synkventures.com/2017/07/25/impact-of-active-directory-migration-or-domain-change-on-sharepoint-part-1/

If your organization has decided to split your company or rename or for any other reason domain needs to be changed then SharePoint will be impacted. In the first part I had explained how to do user migration from SharePoint point of view.

Next step is to do Server Migration of SharePoints in new domain.

What is the recommended way to do this?

Note that Microsoft does not support chaning domain in same existing servers. It means you have to create a new farm in new domain with new service accounts and then do a data migration.

Broadly these are the steps to do it

  1. Create a new farm same as previous one or an upgraded one(scale) if needed.
  2. Create new service accounts in new domain to be used in new farm. Use these accounts to create and configure new farm.
  3. Migrate all Service Applications like Managed metadata service, Search service, User profile service, Workflow manager etc
  4. Create web applications same as previous farm
  5. Deloy any custom code WSP from the previous farm to new one
  6. Use database attach upgrade process to migrate content databases and attach to newly created web applications.
  7. Configure any SharePoint hosted app or provider hosted app
  8. Test and verify that all data has been migrated and also custom code as working as expected

Above are very broad steps, if you have done any upgrade such as SharePoint 2010 to 2013 or SharePoint 2013 to 2016 then you will find the steps familiar.

Although you always expect these steps to be done smoothly you know it will never be like this.

Below are some things you might experience or not experience but I am listing then down from our experience

  1. Issues with custom code where html files has been used for JavaScript based programming : Somehow the reference to js code was lost and it was not pointing to correct relative urls in the site. This was fixed manually in multiple places
  2. Workflow issues: Some of the workflows were republished and started working. Workflow 2013 had couple if isssues as well, you may refer to this article for more details https://synkventures.com/2019/05/18/sharepoint-workflow-2013-not-working-after-migration-workflow-issues/
  3. Provider hosted and SharePoint hosted app: All the apps had lost their settings and needed a deploy on all sites. This can be done via script.

You can always find new issues so it’s very important to testing and verification for all functtionalties.

If you have any more detail questions please contact us via Contact page.

if you have any questions or remarks please contact us via our Contact Us page or via our Facebook page or via Twitter

SharePoint Workflow 2013 not working after migration #workflow #issues

Context

We were doing a SharePoint 2013 Server domain migration in which we had to migrate Workflow Manager as well.

After migration, Workflow Manager 2013 did not work fine in new environment so we had to attached old environment server to new farm with the old domain account. You can call this as a temporary work around.

Issue

All SharePoint Workflow 2013 stopped working and were getting “cancelled” whenever they were running.

Mainly two issues:

  1. Wokflow App Permissions were not correct, if you are not sure what I am talking about please refer to this link https://docs.microsoft.com/en-us/sharepoint/dev/general-development/create-a-workflow-with-elevated-permissions-by-using-the-sharepoint-workflo
  2. Tasks were not getting created by Workflow 2013 in Task list and workflow failed or canceled.

Resolution

  1. First issue was resolved by using the same link posted earlier and I will say half of the workflows worked fine
  2. Second issue was complex and I was not able to find a resolution but one of my colleague found resolution, I was able to only collect error messages which was also important as we were not able to pin point root cause

You may see following error messages in the SharePoint ULS logs, the key issue for us was the ones highlighted in bold

Trusted provider is missing. Provider: ‘00000003-0000-0ff1-ce00-000000000000’

Request does not have SPBasePermissions.UseRemoteAPIs permission. Need to check it when each API is accessed

SocialRESTExceptionProcessingHandler.DoServerExceptionProcessing – SharePoint Server Exception [System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.    
 at Microsoft.SharePoint.Client.ServerStub.CheckRequiredResourceRight(ProxyContext proxyContext, String memberName, ResourceRight right)    
 at Microsoft.SharePoint.Client.ServerStub.CheckBlockedGetProperty(String propName, ProxyContext proxyContext)    
 at Microsoft.SharePoint.ServerStub.SPContextServerStub.GetStaticProperty(String propName, ProxyContext proxyContext)    
 at Microsoft.SharePoint.Client.ServerStub.GetStaticPropertyWithMonitoredScope(String propertyName, ProxyContext proxyContext)]

Throw UnauthorizedAccessException instead of SPUtilityInternal.Send401 for client.svc request.

So what does this mean? It means that API calls are failing and not reachable when workflows are running. In our set up due to domain migration we had two https url and one of them was default. We observed that the API calls via default urls were always failing so we decided to dig deeper.

We found out that in web application web.config file if you have below attributes and have urls under it then API calls are working only for those urls so first we thought we can add all the urls but it seems you cannot add two https url and it is not supported, bascially we are talking about host headers we had three host headers in IIS but only two here.

<serviceHostingEnvironment aspNetCompatibilityEnabled=”true”>        <baseAddressPrefixFilters> 

<add prefix=”https url” /> 

<add prefix=”http url” />       

</baseAddressPrefixFilters>    </serviceHostingEnvironment>

To fix this and allow all the traffic what you can do is to have only one https url or host header which I will say is ideal way of running SharePoint 2013. Note that SharePoint 2016 or 2019 are not expected to have these issues

Other way is to change config like below and allow all urls

<serviceHostingEnvironment aspNetCompatibilityEnabled=”true”>    </serviceHostingEnvironment>

I hope this helps someone as it took lot of time for us to find this.

if you have any questions or remarks please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

SharePoint Crawler error – Warning in Index component, Cannot plan query for index system. Index fragment ‘0’ has no available cells #sharepoint #crawler #searchservice

Search can return this error due to various reasons “Search has encountered a problem that prevents results from being returned. If the issue persists, please contact your administrator” but this will be certainly come if there is an error in one of the search components.

If you check in ULS log you will see this error ” Cannot plan query for index system. Index fragment ‘0’ has no available cells.”

This error indicates that there is an error in index partition and you should see a yellow warning exclamation in Central Admin as shown below

SearchError

If your error meets all these criteria then you have the same issue. If you look at other articles regarding then 90% of articles will mention to do an index reset and do a full crawl which will definitely fix the issue but this should be your last option and not the first one in a production environment.

To fix the issue we should look at clearing configuration cache on the server where index partition is being stored.

The steps to clear configuration cache is very well documented and can be found below

Steps to clear configuration cache

But doing these steps might not fix the issue so follow below instructions

  1. Try first clearing configuration cache and check if error gets fixed
  2. If not then again do the same steps but this time also restart SharePoint Search Service before you restart the SharePoint Timer Service
  3. If this also does not work then try to restart the server after step 1, restarting server in Production environment is not advisable during office hours so do it in planned manner
  4. If this also does not work then we are left with no other option but do an index reset and do a full crawl, use steps documented on Microsoft site Perform index reset

Also note that during these operations if any incremental or full crawl was going on you need to let it finish to make a call if above has fixed the issue. We observed that issue goes away only when crawl has finished.

Above strategy should work in most cases if not then reach out to us and we can help.

Please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

 

Redirect SharePoint site from HTTP to HTTPS- Issues and Resolutions #SharePoint #SharePoint2013

When we start with SharePoint infrastructure lot of time SSL is not taken into consideration but at later point of time and surely in Production you should have SSL for encryption.

Since your users are used to HTTP URL you cannot ask every one of them to go to HTTPS from now on. The best is to redirect users automatically from HTTP to HTTPS. This article is not about how do this automatic redirection you can get to know the steps from here

Redirect HTTP to HTTPS

We also did steps same as above but we faced some issues after which you might also get which depends on how your infrastructure has been set up

  1. Issues with OneNote : If your end users have stored OneNote in document library all of them will have HTTP URL as their source so after redirecting to HTTPS you cannot save it to HTTP anymore. If one of users save it with new URL then it will be saved as new OneNote file. This is a tricky situation as you cannot get the old file and all will have local copies. Best strategy is to have the latest OneNote saved before you do redirection and upload it as new one after redirection.
  2. Issues with embedded links in files : If you have embedded links of MS Office documents in other documents then you will still be able to open documents but all of them will open in read only mode but usually you will have option to edit directly from them. Solution to this to update the links after redirection, there is no alternative to this. Good part is still you can open the file.
  3. Search issues : If you have HTTP URL as default URL in AAM or have used HTTP URL in search configuration then your search might break, you will not see any results but no error as well. To fix this you just use HTTPS URL at all places.

So these are things you need to consider if you plan for HTTP to HTTPS redirection.

Some other reference

http://support.microsoft.com/kb/2818415

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

Connect to Outlook and Sync to Outlook in SharePoint Task list #SharePoint #SharePoint2013 (We weren’t able to start syncing your tasks because one or more prerequisites for connection to Exchange server could not be found. Please contact your Administrator to resolve the issue)

When you create a Task list in SharePoint you can see two options in List Settings tab depending how the Farm has been configured.

Two options are

  1. Connect to Outlook
  2. Sync to Outlook

Users will see Sync to Outlook option if a Farm level feature called “Farm Level Exchange Tasks Sync” is enabled else they will see Connect to Outlook.

Note this feature is accessible only from Central Admin under Manage Farm Features.

farmlevelsynctasks

Issue with Sync To Outllok option is that just enabling this will not make Sync To Outlook work properly, most probably you will get error like below

synctooutlooj

We weren’t able to start syncing your tasks because one or more prerequisites for connection to Exchange server could not be found. Please contact your Administrator to resolve the issue.

To make this lot of prerequisites are required, details can be found here

Sync To Outlook Configuration – TechNet

If this works it means that Tasks will be synced at real time on all devices on which you have Outlook and you can Sync only the tasks Assigned to you. Unfortunately if the prerequisites are not met users can get frustrated by above error message.

In case your organization cannot fulfill prerequisites for Sync to Outlook then best is to go for Connect to Outlook which can at least make a Copy of Task list but not on all devices, only on current device.

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

 

SharePoint 2013 Search Error : object reference not set to an instance of an object – Fix #SharePoint #SharePointSearch

If you like my blog post please subscribe to my YouTube Channel “SYNK Ventures – Let’s talk about Microsoft 365” as well https://www.youtube.com/channel/UC6vLzWN-3aFG8dgTgEOlx5g?sub_confirmation=1

This a common error message which you can see if you have search issues “Object reference not to set an instance of an object”. This error message does not tell much and you will have to look SharePoint log and find the correlation ID.

If you search on the internet for this error you will hit numerous reasons and fix for it. Problem is that error message is very generic and can be seen for various kind of issues. I have encountered this in two scenarios which I am gonna list down.

First thing you need to check SharePoint health, if there is an error in that best resolution is to recreate the index

You must have some error message in SharePoint search status like below

search-topology-monitoring

Reset search index

If that is the not the case the other reason can be you have orphaned items in your farm / content database. Generally you will get error message in SharePoint Health Analyzer for this but in our case we did not get it strangely. So basically you cannot trust it so best is to look for correlation ID in SharePoint Log.

What I observed is that when you search in SharePoint it will enumerate all site collections and it might fail doing so if you have orphaned items. You should look carefully and find out which content database it was enumerating.

If you have find out you should use below command to Refresh Sites for the content database. This method synchronizes information between content and config databases.

$db = Get-SPDatabase | where {$_.Name -eq “DatabaseName”}

$db.RefreshSitesInConfigurationDatabase()

If this also does not work you can use below as well but this needs to be done out of office hours.

Dismount-SPContentDatabase “<ContentdBName>”

Mount-SPContentDatabase “” -DatabaseServer “” -WebApplication http://SiteName

Hopefully this well help someone and I just added one more solution in list of solution available.

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

SharePoint 2013 migration to Office 365 step by step – Data Migration #SharePoint #Office365

After building the strategy and planning for it, next step is Data Migration from SharePoint 2013 to Office 365. We are going to look into native import / data migration service provided in Office 365, you need to be an Office 365 Administrator or at least have someone to help with initial set up.

Before we start actual migration we need to do some set up. Login to Office 365 and go to menu Users –> Migration.

datamigration

Once there scroll to see Onboarding and migration guidance, click on SharePoint and new window will open.

onboardingmeny

This will guide to Onboard you and create migration jobs, I am just capturing relevant steps here

onboardingsteos

Step 1 is just some text about SharePoint online

Step 2 is very important as you need to define what kind of deployment you will have, in our case we will select on premise to cloud.

oboarding-step-2

Step 3 explains PowerShell option we have selected On-premise to cloud migration

Step 4 is to prepare for PowerShell, first it download and install SharePoint Online Management Shell, download it from here SharePoint Online Management Shell.

Second is to create Azure Storage account if you don’t have already one.

Go to https://portal.azure.com and create a storage account

storageaccount

Also get your location and details

step-4

sponlinepowershell

Step 5 is creation of Content package, we need to use classic Export Web command in SharePoint onpremise server to create an export package

Export-SPWeb [-Identity] -Path [-ItemUrl ] [-NoFileCompression ]

Step 6 is coversion of package so that it can be imported

ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath $sourceFiles -SourcePackagePath $sourcePackage -OutputPackagePath $targetPackage -TargetWebUrl $targetWeb -TargetDocumentLibraryPath $targetDocLib -Credentials $creds

To read more about ConvetTo-SPOMigrationTargetedPackage you can read here Click here

Step 7 is creating Azure Containers and uploading content package

$al = Set-SPOMigrationPackageAzureSource -SourceFilesPath $sourceFiles -SourcePackagePath $targetPackage -AzureQueueName $azureQueueName -AccountName $azureAccountName -AccountKey $azureAccountKey

$al|$al|fl

Step 8 is submitting a migration job, sample code is here

Submit-SPOMigrationJob -TargetWebUrl $targetWeb -MigrationPackageAzureLocations $al -Credentials $creds

Note that some parameters variables were created in earlier steps and needs to be used here

Step 9 is to check Migration Job Status which can be done Azure account storage queue

Sample source code

# Example file share packaging, conversion, upload and job submission script
# Queue is only container specified as new containers are automatically generated
# All container URIs get populated into $al variable output from Set-SPOMigrationPackageAzureSource cmdlet
$creds = (Get-Credential admin@contoso.com)
$sourceFiles = ‘\\fileshare\users\charles’
$sourcePackage = ‘C:\migration\CharlesDocumentsPackage_source’
$targetPackage = ‘C:\migration\CharlesDocumentsPackage_target’
$targetWeb = ‘https://contoso-my.sharepoint.com/personal/charles_contoso_com&#8217;
$targetDocLib = ‘Documents’
$azureAccountName = ‘contosomigration’
$azureAccountKey = ‘Insert Azure Account Key string Here’
$azureQueueName = ‘migrationqueue’
# Create new package from file share without security (faster)
New-SPOMigrationPackage -SourceFilesPath $sourceFiles -OutputPackagePath $sourcePackage
# Convert package to a targeted one by looking up data in target site collection
ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath $sourceFiles -SourcePackagePath $sourcePackage -OutputPackagePath $targetPackage -TargetWebUrl $targetWeb -TargetDocumentLibraryPath $targetDocLib -Credentials $creds
# Create azure containers and upload package into them, finally snapshotting all files
$al = Set-SPOMigrationPackageAzureSource -SourceFilesPath $sourceFiles -SourcePackagePath $targetPackage -AzureQueueName $azureQueueName -AccountName $azureAccountName -AccountKey $azureAccountKey
# This displays the return Azure location
$al|$al|Format-List
# Submit package data to site collection to create new migration job
Submit-SPOMigrationJob -TargetWebUrl $targetWeb -MigrationPackageAzureLocations $al -Credentials $creds

So this completes all steps for data migration. Next we will look into Hybrid scenarios which will come in next post

To check earlier two posts click below

SharePoint 2013 migration to Office 365 step by step – Planning #SharePoint #Office365

SharePoint 2013 migration to Office 365 step by step – Strategy #SharePoint #Office365

 

 

 

SharePoint 2013 migration to Office 365 step by step – Strategy #SharePoint #Office365

This post is written as step 2 that is strategy. Step that is planning can be read here SharePoint 2013 migration to Office 365 step by step – Planning #SharePoint #Office365

Once we have filled in the excel template and also found out all issues via SharePoint Migration assessment Tool we need to formulate a strategy to find solution to issues and customizations.

As an outcome of the first step you should have a list of categorization of issues / customizations for which you need to strategize. I am listing down some if it, note that these are just examples and it totally depends on what you have done in your farm before and how much customizations have been done.

customizationcategory

For more reading about above topics and in text format use below link to download an excel Customization / Issues Categorization

Note that any solution will be based on what kind of Office 365 license you have, whether your organization will have PowerApps or Flow or not? Also whether you will have SharePoint Add-in model in place or not

If you have any questions with specific customization solution you can ask in comment section and I will try my best to provide a solution to that.

After we define a strategy for customizations we need to find a strategy to migrate data from On-premise to Office 365. This will be our third step and we will define that in next post. Before we do data migration it’s important to list down how many Web Applications we have, size of Content Databases.

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

SharePoint 2013 migration to Office 365 step by step – Planning #SharePoint #Office365

This post is written as step 1 that is planning.

When SharePoint 2010 was launched Microsoft wanted to move everyone to cloud and they were trying to convince everybody that cloud is the future but they soon realized everything cannot be moved to cloud due to local data regulations and customers apprehensions about data security. Now Hybrid architecture is promoted quite a lot which makes sense and also more practical.

In this post I will try to outline how to prepare for Migration from SharePoint 2010 / 2013 to Office 365. We also discuss Hybrid architecture later in other posts.

We will discuss different aspects of migration, in this post we will understand SMAT tool provided by Microsoft and also excel template created by me to analyze customizations.

Microsoft has introduced a SharePoint Migration assessment Tool called SMAT, you can download it from here SMAT.

The zip file downloaded needs to be run on a SharePoint server, file contains below files, some of them are important to understand

smatfiles

File SiteSkipList.csv is important as you can mention which sites needs to be skipped during assessment, like you can mention MySite to be skipped as in general they don’t have any customizations and many sites under it.

SMAT Read me have more instructions but to run it you need run the exe file via command prompt

SMAT.exe -0 D:\Outputlog

where D:\Outputlog is the destination where logs will be created, do not out the log destination as SMAT folder as it tries to clean up and will end up deleting files.

While its running you can see what it will be scanning, below is a screenshot while it runs. You can see it’s analyzing FullTrustSolutions, LargeExcelFiles, Wokflows etc.

Since we know that no server side code is allowed in Office365 it’s important to have this kind of analysis to understand what things needs to reimplemented.

smatcapture

Once the assessment tool finished it will generate reports for each topic in detail and list down all site details, issues about it like below

smatreports

Each report has very detailed information, if you want to understand meaning of each report you can refer to this link SMAT Report Definitions. Although I think names are self-explanatory.

These reports will help you understand what issues you will face if you need to migrate but for planning I have created excel template where you can list all customizations and also strategize around it. This is needed because I believe that no one understands your farm better.

You can download the excel template from here, each column has some explaination.There are two sheets. First sheet is for listing all customizations and categorized them. Second sheet is to write down solution details of each category. This way you can have common solutions for each category and it can define how your developers should approach re-implementation

SharePoint 2013 to Office 365 Migration Template

So the migration assessment tool and excel template will help you analyze your farm in great detail and plan for the migration.

Tech Tip : Are you in search of a remote working technology? Access your online private workspace on any device(PC/android/iOS) with remotely accessible citrix vdi from CloudDesktopOnline with enterprise Add-Ons like Hosted SharePoint and Exchange. If you`re a MS Azure user looking for managed azure services visit Apps4Rent.

You can read the part 2 here SharePoint 2013 migration to Office 365 step by step – Strategy #SharePoint #Office365