Ethan Deng's SharePoint Blog

About Me
SharePoint
Blog
List Pagination 1
List Pagination 2
Customize Home Page
Excel Services Issue
Error with mngfield Page
User Defined Function
Enable Incoming Email
Install SP2 On R2
SharePoint Content Migrat
SharePoint2010 Installati
Troubleshoot Search
Dash Sign And Search
Search Pattern Issue
Create Dropdown Menu
Email Enabled Custom List
Email Enabled Issue List
SharePoint Folder
Cost Effective Small Farm
SharePoint Throttling
SystemUpdate And Alerts
A Parallel Approach

Troubleshoot User Defined Functions of SharePoint Excel Services

When you have followed the instruction like this one Creating Managed-Code UDFs for Excel Services to create User Defined Functions, you may find that the UDF doesn't work.
 
There are two things to check.
 
1st, if you deploy the UDF assemblies to hard drive, the location of the UDF assemblies cannot be your user folder under c:\Users\username\...
If you deploy the dll under user's folder, the SharePoint service account will not have asscess to it.
 
2nd, if you deploy the UDF assembly to GAC, make sure to use the strong name in configuration. The example given in the Shared Services Admin is not right
 
"Strong name or full path of an assembly that contains user-defined functions, which Excel Calculation Services can call. Examples: SampleCompany.SampleApplication.SampleUdf, C:\UDFs\SampleUdf.dll, \\MyNetworkServer\UDFs\SampleUdf.dll."
 
and MSDN document is wrong too.
 
The strong name format is
 
SampleCompany.SampleApplication.SampleUdf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=18b82a9afe7f447a
 
Notice the hightlighted part doesn't have .dll.