Archive

Author Archive

Excel Calculation Services and RBS

October 5, 2014 Leave a comment

On a recent project I came across a strange problem with Excel Calculation Services.

On a SharePoint 2013 farm with multiple web applications, Excel services was working perfectly on a couple of the web applications but not on others. The trusted locations and process identity settings were set and checked but were not at fault, digging through the ULS logs was showing this.

10/01/2014 15:37:57.58  w3wp.exe (0x7130)        0x4220  Excel Services Application            Excel Calculation Services                ech0      Medium               ExcelService.PostProcessRequest: web method: OpenWorkbook, got exception Id=GenericFileOpenError; Microsoft.Office.Excel.Server.CalculationServer.FileOpenException: The workbook cannot be opened. —> Microsoft.Office.Excel.Server.Host.HostFileException —> Microsoft.SharePoint.SPException: Cannot complete this action.  Please try again. —> System.Runtime.InteropServices.COMException: Cannot complete this action.  Please try again.

    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm, IrmProtectionParams fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)

    at Microsoft.SharePoint.Library.SPRequest.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm, IrmProtectionParams fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)     — End of inner exception stack trace —

    at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)

    at Microsoft.SharePoint.Library.SPRequest.GetFileAsStream(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob, String bstrEtagNotMatch, Object punkSPFileMgr, Boolean bHonorCustomIrm, IrmProtectionParams fileIrmSettings, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagNew, String& pContentTagNew, SPFileInfo& pFileProps)

    at Microsoft.SharePoint.SPFile.GetFileStream(SPWeb web, String fileUrl, Boolean honorLevel, SPFileLevel level, OpenBinaryFlags openOptions, String etagNotMatch, SPFileStreamManager spMgr, SPFileRightsManagementSettings rightsManagementSettings, Boolean throwOnVirusFound, SPVirusCheckStatus& virusCheckStatus, String& virusCheckMessage, String& etagNew, String& contentTagNew, SPFileInfo& fileprops)

    at Microsoft.SharePoint.SPFile.GetFileStream(OpenBinaryFlags openOptions, String etagNotMatch, String& etagNew, String& contentTagNew)

    at Microsoft.SharePoint.SPFile.OpenBinaryStream(SPOpenBinaryOptions openOptions, String etagNotMatch, String& etagNew)

    at Microsoft.SharePoint.SPFile.OpenBinaryStream(SPOpenBinaryOptions openOptions)

    at Microsoft.Office.Excel.Server.MossHost.MossHostFileLoader.FetchStreamInternal()     — End of inner exception stack trace —

    at Microsoft.Office.Excel.Server.MossHost.MossHostFileLoader.FetchStreamInternal()

    at Microsoft.Office.Excel.Server.MossHost.MossHostFileLoader.FetchStream(IIdentity currentIdentity)

    at Microsoft.Office.Excel.Server.CalculationServer.SharePointFileLoader.FetchStream()     — End of inner exception stack trace —

    at Microsoft.Office.Excel.Server.CalculationServer.SharePointFileLoader.FetchStream()

    at Microsoft.Office.Excel.Server.CalculationServer.BaseWorkbookManager.CacheStream(CachedFile cachedFile, FileLoader loader)

    at Microsoft.Office.Excel.Server.CalculationServer.BaseWorkbook.Microsoft.Office.Excel.Server.CalculationServer.ICachedFileProvider.SaveFile(CachedFile cachedFile)

    at Microsoft.Office.Excel.Server.CalculationServer.CachedFile.SaveFile(ICachedFileProvider fileProvider)

    at Microsoft.Office.Excel.Server.CalculationServer.LocalDiskCache.ReserveCachedFileAndMarkUsed(FileId fileId, ICachedFileProvider fileProvider, Boolean replaceExistingFile)

    at Microsoft.Office.Excel.Server.CalculationServer.BaseWorkbook.ReserveCachedFileAndMarkUsed(FileLoader fileLoader, SessionId previousSessionId)

    at Microsoft.Office.Excel.Server.CalculationServer.BaseWorkbook.<FileStreamJob>b__e(IssueLoadThreadArg arg)

    at Microsoft.Office.Excel.Server.CalculationServer.BaseWorkbook.ExecuteWorkbookJob(WorkbookJobDelegate workbookJob, Object param)     24e5bd9c-6708-8070-314e-c1443430d9e0 

 

Looking at the Excel Services file cache for a working request we were seeing this.

image

 

but for a non working request we were seeing this.

image

 

the only commonality seemed to be that the non-working web applications were using RBS for BLOB storage.

Digging through the ULS logs some I finally found the following error.

 

System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object ‘rbs_fn_get_blob_reference’

A quick google turned up some blogs about database permissions for service accounts, following this blog http://blog.sharepointsite.co.uk/2014/01/sp-2013-ssrs-failing-after-rbs-enabled.html

I added the db_rbs_admin database role to the Excel Services service account for each RBS enabled database and Excel services sprang into life.

Categories: SharePoint 2013

SharePoint 2013 SSRS Migration “User cannot be found”

July 19, 2014 Leave a comment

A recent project I worked on involved a SharePoint 2010 to 2013 migration, part of this migration was to migrate an SSRS 2012 install from SP2010 to SP2013, the steps are well documented in MSDN http://msdn.microsoft.com/en-gb/library/hh759331.aspx

As part of the migration process we moved from classic to claims authentication, this is a straight forward 2 step process

1 ) Create a web app in classic mode in the 2013 farm and mount the content database from SP2010.

Classic

 

2) Call the Convert-SPWebApplication cmdlet to migrate the user accounts to claims authentication.

Convert

To perform the SSRS migration we installed SSRS 2012 SP1, moved across the reporting database and Encryption key, when testing the reports a few worked but lots were showing the error “User Cannot be Found” error as outlined in this blog post.

http://chanakyajayabalan.wordpress.com/2011/06/17/ssrs-report-server-has-encountered-a-sharepoint-error-user-cannot-be-found/

The post above suggests that a user has been deleted from the content db, we checked this but no accounts were marked as deleted.

The next step was to run a SQL trace while opening the reports and see what is being called.

The site ID was DDDC5D75-A52C-4FD9-8DE9-405246F54C4A, in the trace file I found the following

proc_SecGetPrincipalById @SiteId=’DDDC5D75-A52C-4FD9-8DE9-405246F54C4A’,@PrincipalId=9,@GetSTSToken=0,@GetExternalToken=0,@RequestGuid=’0873A39C-9913-7078-5AE6-AF4064C5D2B6′

 

proc_SecGetPrincipalById @SiteId=’DDDC5D75-A52C-4FD9-8DE9-405246F54C4A’,@PrincipalId=10,@GetSTSToken=0,@GetExternalToken=0,@RequestGuid=’0873A39C-9913-7078-5AE6-AF4064C5D2B6′

 

Checking back in the content db UserInfo table both ID’s were for valid users but Id 9 was for a migrated user (an account that starts i:0#.w|domain\username) however Id 10 was a non-migrated user account (an account in the format domain\username) .

Checking the account for Id 10 there was no matching entry in AD, I can only assume this user account had been previously deleted from AD but not removed from SharePoint, hence the “User cannot be found” error.

Some more searching turned up this MS support article http://support.microsoft.com/kb/2781008 describing the same issue but different circumstances, the fix is rolled into SQL Server 2012 SP1 CU2, installing this patch fixed the issue for us and we could open all the reports again.

Categories: Work

SharePoint 2010 Designer Issues

June 8, 2014 Leave a comment

While it is always good to work with the latest and greatest versions of everything, there are still solutions running on 2010 that need maintenance.

So recently I found myself having to update a SharePoint 2010 solution that was made up of an SPD2010 workflow, a content type and library template. I had to update the content type, workflow and library template with some new and updated columns.

The library template was using a custom Edit form with some of the  content type fields hidden, so I had to update the Edit form to show some new fields. To add a new field to a form you would normally edit the form table to and new rows where needed then select the field from the data source and select as ‘Insert as List Form Field’, unfortunately this option was no available; updating an edited form seems to be a common problem with SPD2010, as the same issue is outlined here.

http://social.msdn.microsoft.com/Forums/sharepoint/en-US/ac032a6b-5195-4ecf-a0ab-6e0117fd1a77/insert-as-list-form-field-not-available-on-data-source-details-panel-when-editing-editformaspx?forum=sharepointcustomizationprevious

My solution was as follows:

Select a field in the form where I wanted the new field and insert a new row into the form table, copy an existing control and insert into the new row, using the Common FormField Tasks control select the new control from the Data Field picker

 

picture2

Now Pick ‘List Form Field’ from the Format as  picker

 

picture1

In the Quick Tag Selector bar the new field will be called <SharePoint:FormField#FormField1>

picture3

From the Quick Control select Edit Tag…

picture4

The Tag code is now displayed with the ID value of  “FormField1

picture5

Now check the other fields and find the control with the highest ID value and set the new tag value the be higher in the format “ff<id>{$Pos}”, ensure both references to the ID value are set

picture7

If the ID numbering is incorrect a duplicate

picture6

Once completed the new control will be available on the form.

Categories: Work

SharePoint 2013, Nintex 2013 Workflow

April 14, 2014 Leave a comment

Recently I have been working with the various Nintex products to create a few demos and prototypes.

Recently while working with a new VM recently I noticed that some of the actions were not performing correctly and the message templates were blank from site to farm level.

None of the normal things seemed to help (IIS Reset, Reboot, Deactivate / Reactivate, Reinstall), until I came across this post on the Nintex forum.

It turned out my VM had the currently withdrawn SharePoint 20103 SP1 applied. As soon I installed the fix normal Nintex service was resumed.

Categories: SharePoint 2013

Opening emails in SharePoint

February 22, 2014 Leave a comment

As part of a recent project we used SharePoint to store emails, both via incoming emails and one of the 3rd party drag and drop tools.

test-emil

Most users were happy with the solution once we had updated the MIME types to allow emails to be opened rather then downloaded, but some still mentioned they would rather that email opened directly from SharePoint rather than seeing the yellow download bar that Internet Explorer puts up.

download

A bit of digging around on the internet came up with the solution from this Microsoft KB article

http://support.microsoft.com/kb/2678934

To enable emails to be opened directly from SharePoint the trick is to disable the Internet Explorer download bar for email file types, to do this add the following registry key to your local machine.

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}

then run the assoc command below to get your .msg file extension type (mine is for Office 2013)

assoc

Now add that file type as a zero length binary value to the key created above.

registry

Emails will open directly from SharePoint.

SharePoint 2013 on Windows Server 2012

January 28, 2014 Leave a comment

There are quite a few articles about installing SharePoint 2013 on Windows Server 2012 around, but I thought I would share a real world experience.

Pretty much the first thing that the SharePoint 2013 Deployment Tool does during an install is try to add the Application and Web Server roles to Windows Server.

 

If your Windows 2012 Server has internet access then you should have no problems, but if your server does not have internet access then you will need a copy of the Windows server ISO and these instructions below as the server roles are now on demand with Windows Server 2012.

http://support.microsoft.com/kb/2765260

A couple of points to note, firstly there is a typo in the instructions for the Offline method.

This instruction

Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45-Source D:\Sources\sxs

should read

Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45 -Source D:\Sources\sxs

note the space before the –Source switch

secondly, the KB article states

Note Be aware that you can also copy the files locally or specify a UNC path where the installation files are stored.

 

We found that having the files copied locally or the ISO file mounted locally worked fine, but trying to run over a UNC path worked for the 1st set of features but failed for the 2nd set with a PowerShell error, as soon as we mounted the ISO locally the 2nd set worked fine.

If your PowerShell works as it should, you will get a result as below.

image

Categories: Work

SharePoint 2010 Workflow Issues

January 10, 2014 Leave a comment

I was recently asked to help out a client who was having problems with standard Out Of the Box Approval workflow.

 

image

We checked the Farm and isolated the issue to one specific site collection, all other site collections were fine.

To resolve this we opened the site collection in SPD, open the All files section drilled into the _catalogs/wfpub folder, the folder for the Approval workflow was present but for some reason the wfconfig.xml file had been modified from the site definition (Shown by blue I symbol), once this file had been reset to the site definition workflows were working again.

Categories: SharePoint 2010 Tags:
Follow

Get every new post delivered to your Inbox.

Join 1,690 other followers

%d bloggers like this: