blog.scoreman.net

Archive for March, 2013

Unhandled Exception when setting Individual Quota on Site Collection

Saturday, March 9th, 2013

Recently I ran in to an interesting situation at a customer. We were setting up a new SharePoint Server 2013 farm and I was showing the customer how to set storage quotas on site collection when we ran into an unhandled exception. The exception occurred when choosing Individual Quota in the dropdown menu under Current quota template. Looking at the correlation id in the ULS log we found the following error messages:

Application error when access /_admin/sitequota.aspx, Error=Object reference not set to an instance of an object.
     at Microsoft.SharePoint.ApplicationPages.SiteQuotaPage.SetFormValues()
     at Microsoft.SharePoint.ApplicationPages.SiteQuotaPage.QTIndexChanged(Object sender, EventArgs e)
     at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
     at System.Web.UI.Page.RaiseChangedEvents()
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

System.NullReferenceException: Object reference not set to an instance of an object.
     at Microsoft.SharePoint.ApplicationPages.SiteQuotaPage.SetFormValues()
     at Microsoft.SharePoint.ApplicationPages.SiteQuotaPage.QTIndexChanged(Object sender, EventArgs e)
     at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
     at System.Web.UI.Page.RaiseChangedEvents()
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
     at Microsoft.SharePoint.ApplicationPages.SiteQuotaPage.SetFormValues()
     at Microsoft.SharePoint.ApplicationPages.SiteQuotaPage.QTIndexChanged(Object sender, EventArgs e)
     at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
     at System.Web.UI.Page.RaiseChangedEvents()
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at System.Web.UI.Page.HandleError(Exception e)
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at System.Web.UI.Page.ProcessRequest()
     at System.Web.UI.Page.ProcessRequest(HttpContext context)
     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Unexpected error occurred in method 'Put' , usage 'SPViewStateCache' - Exception 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode:SubStatus:The request timed out.. Additional Information : The client was trying to communicate with the server : net.tcp://servername.company.se:22233
     at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)
     at Microsoft.ApplicationServer.Caching.DataCache.InternalPut(String key, Object value, DataCacheItemVersion oldVersion, TimeSpan timeout, DataCacheTag[] tags, String region, IMonitoringListener listener)
     at Microsoft.ApplicationServer.Caching.DataCache.<>c__DisplayClass25.b__24()
     at Microsoft.ApplicationServer.Caching.DataCache.Put(String key, Object value, TimeSpan timeout)
     at Microsoft.SharePoint.DistributedCaching.SPDistributedCache.Put(String key, Object value)'.

The stack trace mentions distributed cache and at first we thought we had some issue where our front end servers could not communicated with the cache servers. The farm topology looked like this:

It turned out to be something totally different causing the problem. The customer had installed the Swedish version of SharePoint Server 2013. Because Central Administration can be hard to navigate on Swedish if you are used to the English administration UI we had installed the English language pack and set that as preferred language. When going back to the Swedish UI in Central Administration the error went away. I verified this in my virtual environment with the English installation of SharePoint Server 2013. After I installed German language pack (I choose German because Swedish was not yet available) and changed preferred UI I could reproduce the error. Guess you should stick with the same language in Central Administration as your installation language if you want to set individual quota on site collections.

A very far-fetched bug and solution as well.