Thursday, March 12, 2015

VPN or Remote Desktop to work environment

It's a very common scenario when you need an access from home to your work machine. It's great if your IT department took care of this, however it's not always the case. Besides that sometimes, when you need the remote access urgently, the VPN is down. There are a plenty options how to workaround this. In my opinion the best and the easiest one is Hamachi by LogMeIn.
Originally I started using it to play Counter Strike with my friends but it turned out to be a life saver after we moved to another office with unstable VPN setup.

Tip: ArgumentException: Microsoft.SharePoint.SPFieldMap.GetColumnNumber

If you see this:
{System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow)
at Microsoft.SharePoint.SPListItemCollection.GetColumnNumber(String groupName, Boolean bThrowException)
at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex, Boolean bThrow)
at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)
at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException)
at Microsoft.SharePoint.SPListItem.get_Item(String fieldName)
probably you are facing with the list view lookup threshold (e.g. like described here).
Or simply the column is not included in the result set (SPQuery -> ViewFields) and you're trying to retrieve missing field value.