SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL
SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL

SharePoint 2007

Incoming Email 2007 to 2013 Upgrade – Errors occurred processing message

After upgrading from SharePoint 2007 to 2013, I experienced a problem with receiving incoming emails on migrated sites from SP 2007.    ULS logs showed incoming email attempting to process EML files but then quickly failing with “Message ID:” but not the EML file name or alias.   After extensive testing we found that SPSite objects were “locked” for exceeding Sandbox Resource Points.   Toggling the “BitFlags” value allowed us to clear the “Resource Exceeded” and allow incoming email to process.

Also, we disabled a few Timer Jobs which calculate Sandbox Resource points (and were re-establishing the SPSite lock).    With both BitFlags cleared to “0” and timer jobs disabled everything ran smoothly.


ULS Failure

02/17/2015 16:46:12.69    OWSTIMER.EXE (0x0C54)    0x1C4C    SharePoint Foundation    E-Mail    6871    Information    The Incoming E-Mail service has completed a batch.  The elapsed time was 00:00:00.  The service processed 2 message(s) in total.  Errors occurred processing 2 message(s): Message ID:  Message ID:   




[AllSites].[dbo].[BitFlags]  Composition

Table   [AllSites]
Column  [BitFlags]

Failed Site have Decimal Value:      12582912
Failed Site have Hexadecimal Value:  0xC00000


                      V_SF_WRITELOCK  0000000000000001    00000000000000000001     no
                       V_SF_READLOCK  0000000000000002    00000000000000000002     no
                 V_SF_FOUNDATIONLOCK  0000000000000004    00000000000000000004     no
                       V_SF_DISKLOCK  0000000000000008    00000000000000000008     no
                         V_SF_BWLOCK  0000000000000010    00000000000000000016     no
                 V_SF_NONPAYMENTLOCK  0000000000000020    00000000000000000032     no
                  V_SF_VIOLATIONLOCK  0000000000000040    00000000000000000064     no
                V_SF_DISKLOCKMSGSENT  0000000000000080    00000000000000000128     no
                  V_SF_BWLOCKMSGSENT  0000000000000100    00000000000000000256     no
                V_SF_USERLOCKMSGSENT  0000000000000200    00000000000000000512     no
                V_SF_DISKWARNINGSENT  0000000000000400    00000000000000001024     no
                  V_SF_BWWARNINGSENT  0000000000000800    00000000000000002048     no
                      V_SF_LARGESITE  0000000000001000    00000000000000004096     no
              V_SF_MAYHAVESITEALERTS  0000000000008000    00000000000000032768     no
                   V_SF_TRIMAUDITLOG  0000000000010000    00000000000000065536     no
                   V_SF_READONLYLOCK  0000000000020000    00000000000000131072     no
                     V_SF_PRESCANNED  0000000000040000    00000000000000262144     no
         V_SF_USERACCOUNTRESTRICTION  0000000000080000    00000000000000524288     no
          V_SF_USERSOLUTIONACTIVATED  0000000000100000    00000000000001048576     no
               V_SF_RESOURCEWARNSENT  0000000000200000    00000000000002097152     no
                V_SF_RESOURCEMAXSENT  0000000000400000    00000000000004194304    yes
                V_SF_RESOURCEMAXLOCK  0000000000800000    00000000000008388608    yes

V_SF_HASSITESCOPEDUSERCUSTOMACTIONS  0000000001000000    00000000000016777216     no
  V_SF_UIVERSIONCONFIGURATIONENABLED  0000000002000000    00000000000033554432     no
             V_SF_SHAREBYLINKENABLED  0000000004000000    00000000000067108864     no
   V_SF_USERDEFINEDWORKFLOWSDISABLED  0000000010000000    00000000000268435456     no
   V_SF_HTTPSHOSTHEADERSITEURLSCHEME  0000000020000000    00000000000536870912     no
                         V_SF_UNUSED  0000000040000000    00000000001073741824     no
            V_SF_SHAREBYEMAILENABLED  0000000080000000    00000000002147483648     no


Disabled Timer Jobs

  • Solution Daily Resource Usage Update
  • Solution Resource Usage Log Processing
  • Solution Resource Usage Update

NOTE – All 3 timer job definitions above repeat per web application.   In our case, we disabled 6 = 3 jobs X 2 web apps.


NEW CodePlex project – SPUpgradeHelper

Today I am happy to announce is available for download.   This project aims to smooth the “double hop” upgrade from MOSS 2007 to SP2010 to SP 2013 by reading a CSV of database targets and automating the Cmdlets needed for a consistent, repeatable, high quality, and fast process.   Please leave a comment here or on CodePlex if you found this helpful.  Cheers! 



Project Description

Migrating MOSS 2007 to SP 2013? This script takes a CSV of databases and runs upgrade Cmdlets in bulk (DB version/Mount/Dismount/Upgrade-SPSite/Claims auth)

Upgrading MOSS to SP2013 is a tedious process with many Cmdlets, especially if you have many databases. This script aims to help automate that process.

Given a CSV with SQL instance and content database names, this script offers Cmdlets to run upgrade steps across many databases all at once. No more TXT or XLS copy and paste madness. Simply populate the CSV, get familiar with UH* Cmdlets and upgrade with ease.

Key Features

  • Read CSV of databases
  • Load helper functions into memory
  • Enable admin to more easily run Cmdlets in bulk
  • Measure time duration for each step (# minutes)
  • Provide detailed LOG file of actions, result, and duration

Quick Start Guide

  • Extract “SPUpgradeHelper.ZIP” to any SharePoint machine in your farm
  • Run “SPUpgradeHelper.ps1” to load helper functions
  • Type in full path to your CSV file (i.e. “C:\TEMP\COLLAB.CSV”)

Function Names

  • UHCIaims – execute SPWebApplication function to upgrade Classic to Claims auth
  • UHCompatibiIity – execute Get-SPSite for “set” of databases to show GUI version (14/15)
  • UHDBVersion – execute TSQL for “set” of databases to show build number (12.0, 14.0, 15.0)
  • UHDismount – execute DisMount-SPContentDatabase for “set” of databases
  • UHMount – execute Mount-SPContentDatabase for “set” of databases
  • UHReadCSV – load CSV file into memory with upgrade “set”, SQL instance, and database names
  • UHUpgrade – execute Upgrade-SPSite for “set” of databases

NOTE – Upgrade “set” is meant for running parallel workstreams. For example, two servers with SP2010 and two servers with SP2013. That way overall upgrade can be expedited by running database set “A” through the first SP2010 and SP2013 server while database set “B” runs on the second server.

Microsoft Upgrade Process

InfoPath tip – detect Security Group with List Item permissions

Yes, everyone says InfoPath is dead … but we’re all still supporting it for a while so I wanted to share one of my favorite tips.  Forms often need role based security at the field level.  Table below with example security matrix.

How can InfoPath detect that?   Don’t some people query SOAP ASMX?   Or even a custom WSP with a custom ASMX?   There is a simpler way with List Item permission.  

  1. Create a new Custom List named “SecurityLevel” with only the default “Title” column.  
  2. Go create the needed SharePoint Groups under Site Permissions.  
  3. Back in “SecurityLevel” add one new item for each SharePoint Group with an identical name.   Hover that item, pull down the menu, and set Item Level Permissions for that group ONLY to have “Read” on that item only.  
  4. With InfoPath Designer edit the XSN Form Template and create a new Data Connection to the list “SecurityLevel” with auto refresh.  
  5. Under Form Load create a rule … if count(SecurityLevel [“Analyst”]) > 0 then set field “SecurityLevel=Analyst”.   
  6. With that in place you are ready to apply formatting rules anywhere needed that use “SecurityLevel” to determine hide/show or read/write.



Now when a user open the InfoPath form, the data connection “SecurityLevel” will only show the items they have access to (which is the same as the SharePoint Group membership!).    Works on MOSS 2007, SharePoint 2010, SharePoint 2013, and Office 365.

Hope this helps.  Please leave a comment if it did. 



DOWNLOAD  InfoPath Form – SecurityLevel.xsn >>






How to point to a custom 404 error Web page

Recently I was working on a custom 404 page with JavaScript logic for retiring an old SharePoint farm.   Replacing the “oldportal” DNS name with “newportal” helped avoid any end user 404 message by automatically handling all redirects.   Microsoft has a great KB article with implementation steps.   However, I had two important changes and wanted to blog about it in case this might help others.

  1. Custom JavaScript redirect logic.   A simple replace statement helps change “oldportal” to “newportal” and seamlessly transition user traffic to the new system.
  2. PowerShell instead of Visual Studio EXE.   Not everyone has Visual Studio or the developer skills needed for compiling a command line EXE.   PowerShell is a simple text command you can run on MOSS2007/SP2010/SP2013 because it references the “Microsoft.SharePoint” assembly and works on older SharePoint server versions.




PowerShell Code – apply web application setting


HTML Code – Custom404.htm

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲