While deploying my solution in visual studio in my development environment I came across a very strange issue. While uploading some master pages defined in my an
Elements.xml file, the deployment threw an exception
System.Runtime.InteropServices.COMException: 0x81020030 The URL '_catalogs/masterpage/IntranetMaster.html' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
After some research and checking the ULS logs I saw this exception:
System.Data.SqlClient.SqlException (0x80131904): Arithmetic overflow error for data type smallint, value = 32768
ExecuteQuery failed with original error 0x80131904
SQL error code from last error 220 - Arithmetic overflow error for data type smallint, value = 32768.
I scanned the SharePoint content database for
smallint columns with high values and found that the
ClientTag column inside the
AllSites table had a value of 32767.
I updated the value to 16000 and my deployment works as expected. It seems like every time I deploy, this number increases in value and eventually it has increased to the maximum value of smallint.
Has anyone experienced this before? What have I done wrong? Is this a bug in SharePoint 2013?