SharePoint – DateTimeControl – unexpected error – iframe – Object reference not set to an instance of an object

Issue

Inside an existing solution, I use a DateTime control:

<Sharepoint:DateTimeControl ID="DateTimeControl1"  dateonly="true" ShowWeekNumber="true" FirstDayOfWeek="1" FirstWeekOfYear="2" runat="server" EnableViewState="true"></sharepoint:DateTimeControl>

Instead of the date picker, i had the following error (An unexpected error has occurred):

2014-12-10_09-45-35

 

In ULS logs:

Medium Application error when access /_layouts/15/iframe.aspx, Error=Object reference not set to an instance of an object. at Microsoft.SharePoint.Utilities.SPUtility.GetThemedImageUrl(String originalUrl, String themeKey) at Microsoft.SharePoint.WebControls.DatePicker..ctor() at Microsoft.SharePoint.WebControls.SPDatePickerControl.InitDatePicker() at Microsoft.SharePoint.WebControls.SPDatePickerControl.set_ShowWeekNumber(Boolean value) at Microsoft.SharePoint.ApplicationPages.DatePickerFrame.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Unexpected System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Utilities.SPUtility.GetThemedImageUrl(String originalUrl, String themeKey) at Microsoft.SharePoint.WebControls.DatePicker..ctor() at Microsoft.SharePoint.WebControls.SPDatePickerControl.InitDatePicker() at Microsoft.SharePoint.WebControls.SPDatePickerControl.set_ShowWeekNumber(Boolean value) at Microsoft.SharePoint.ApplicationPages.DatePickerFrame.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

Solution

You need to create a root site collection (/).

Easy, but SharePoint is capricious as always.

 

Project Server 2013 – Access to the registry key ‘Global’ is denied

Issue

Every minutes, in ULS logs, you get this error:

  • Process: Microsoft.Office.Project.Server
  • Product: Project Server
  • Category: Project Calculation Service
Timer Task thread crashed System.UnauthorizedAccessException: Access to the registry key 'Global' is denied. 
 at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str) 
 at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity) 
 at Microsoft.Win32.RegistryKey.GetValue(String name) 
 at System.Diagnostics.PerformanceMonitor.GetData(String item) 
 at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item) 
 at System.Diagnostics.PerformanceCounterLib.get_CategoryTable() 
 at System.Diagnostics.PerformanceCounterLib.CounterExists(String category, String counter, Boolean& categoryExists) 
 at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter) 
 at System.Diagnostics.PerformanceCounter.InitializeImpl() 
 at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly) 
 at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName) 
 at Microsoft.Office.Project.Server.BusinessLayer.PcsEngine.PcsPerfCounter.<.ctor>b__0() 
 at System.Lazy`1.CreateValue() --- End of stack trace from previous location where exception was thrown --- 
 at System.Lazy`1.get_Value() 
 at Microsoft.Office.Project.Server.BusinessLayer.PcsEngine.PcsPerfCounter.EnsureSampleDataTask() 
 at Microsoft.Office.Project.Server.BusinessLayer.PcsEngine.PcsTaskWorker.PerformTasksCallback(Object obj) StackTrace: 
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 
 at System.Threading.ThreadPoolWorkQueue.Dispatch()

Solution

Project Server maintains performance counters for itself. So it must have rights to do so. You need to add the account that start Project Server to the following local Windows groups:

  • Performance Log Users
  • Performance Monitor Users

Then restart Project Server services when the job queue is empty

SharePoint 2013 – MsiInstaller – 1015 – Failed to connect to server. Error: 0x80070005

Issue

Everynight in event log, you find this warning:

Failed to connect to server. Error: 0x80070005

2014-08-03_16-37-25

But you don’t find the generally associated COM errors.

Solution

  1. Make farm admin account temporary local admin (the one that start SharePoint Timer)
  2. Through SharePoint PowerShell: Get-SPProduct -local
  3. Through SharePoint PowerShell: (get-spserver $env:computername).NeedsUpgrade
  4. Start manually the timer job which generate this warning: Get-SPTimerJob job-admin-product-version | Start-SPTimerJob
  5. Ensure this warning is not happening anymore
  6. Remove from local admin group
  7. Restart SharePoint Timer
  8. Start again manually the timer job which generate this warning: Get-SPTimerJob job-admin-product-version | Start-SPTimerJob
  9. Ensure this warning is not happening anymore

Microsoft Project – deliverable – fichiers srchui.dll and jscript.dll

From Microsoft Project 2010 and 2013, using the deliverable you get this error message:

23-03-2014 11-49-30

This message look like coming from graveyard of Project 2003.

Useless to search your hard drive for these files, you don’t have them.

The real problem is security of the “Internet” zone in Internet Explorer, even if your server is in the “intranet” one.

Internet zone must not be in the highest position, or deliverables won’t work.

26-03-2014 07-43-13

Even happening with Windows Server 2012 R2 + Project 2013 SP1 + IE 11 full updated…

 

 

SharePoint/Project 2013 SP1 – Configuration wizard

After deploying Service pack 1 for SharePoint/Project 2013, you have to go through the configuration wizard. In this case, it was failing on all nodes with this error in log:

SyncUpgradeTimerJob: sleeping for 10 seconds
SyncUpgradeTimerJob: sleeping for 10 seconds
SyncUpgradeTimerJob: Upgrade timer job failed. Return -1.
The exclusive inplace upgrader timer job failed.

 

Step 1 – other log

Another log is much more useful, in same location, named like upgrade-date-blahblah-error.log:

Exception: The operation cannot be performed on database "WSS_UsageApplication" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.  ALTER DATABASE statement failed

Or by using upgrade-spfarm command:

29-03-2014 12-55-19

 

Answer

Remove SQL Mirrpor or Always-on during upgrade on this database.

 

 

SharePoint – User profile – ResetSynchronizationDatabase : Operation is not valid due to the current state of the object

Issue

Trying to reset the SharePoint UPS sync database, I had the following error message:

PS C:> $upa.ResetSynchronizationDatabase()
 Exception calling "ResetSynchronizationDatabase" with "0" argument(s):
 "Operation is not valid due to the current state of the object."
 At line:1 char:1
 + $upa.ResetSynchronizationDatabase()
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
 + FullyQualifiedErrorId : InvalidOperationException

Resolution

Database was in mirror, and i had the following event on the SharePoint box:

event_5586

You need to first remove mirroring session and try again.

 

 

SharePoint: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

Top issues:

  • Powershell prompt not started with run as administrator (UAC)
  • You are not a local admin at all,
  • You don’t have access to database in SQL. Snapin must connect to SQL database.

For the UAC stuff, you can use Process Explorer to be sure you are really an admin (UAC elevated):

  • Deny : You are memver but UAC is blocking you (filtered). Restart with run as administrator
  • Owner: You are really admin with UAC elevated. Check SQL rights 😉

06-05-2013 22-52-21

06-05-2013 22-53-32

 

SharePoint – event 8311 – SSL policy errors have been encountered. Error code 0x2

 

SharePoint is generous in error messages, and they nearly get a reason evertytime…Just need to figure out

This time, the following error message appeared both on 2010 and 2013 farm:
sharepoint event 8311

Which give in text:

Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Event ID: 8311
Task Category: Topology
Level: Error
Description:
An operation failed because the following certificate has validation errors:nnSubject Name: CN=Server.mydomain.netnIssuer Name: CN=my-CA, DC=mydomain, DC=net

Errors:nn SSL policy errors have been encountered. Error code '0x2'..

 

Cause

A certificate has been binded to IIS for SharePoint Web Services site ((binding SSL port 32844).

Resolution

The server is registered in SharePoint with its short name and this certificate subject contains the FQDN name.

2 solutions:

  • Get another certificate with a matching subject name,
  • Rename server in SharePoint farm to its FQDN

That last solution was chosen, done in PowerShell.

Get servers with their registered name in farm:

get-spserver

Rename one server (must be done locally on the server):

Rename-SPServer -Identity MyServer -Name MyServer.MyDomain.net

Follow by a iisreset, and wait 10mn to get topology updated 🙂

 

Project 2013: Upgrade-SPProjectWebInstance – ActivatePWAWebThemesFeature failed

Trying to upgrade a Project instance from 2010 to 2013:

Upgrade-SPProjectWebInstance https://url/pwa

I got the following error:

Upgrade-SPProjectWebInstance : Post provision setup failed.
ActivatePWAWebThemesFeature failed.
At line:1 char:1
+ Upgrade-SPProjectWebInstance https://url/pwa
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : InvalidData: (Microsoft.Offic...radePwaInstance:
 PSCmdletUpgradePwaInstance) [Upgrade-SPProjectWebInstance], ProvisionException
 + FullyQualifiedErrorId : Microsoft.Office.Project.Server.Cmdlet.PSCmdletUpgradePwaInstance

 

Solution:

You need to firstly upgrade the SharePoint site to 20103 to get the feature available::

Upgrade-SPSite -Identity https://url/pwa -versionupgrade

Then start again the pwa upgrade:

Upgrade-SPProjectWebInstance https://url/pwa