A lot of the InfoPaths being developed for hosting within Sharepoint (Browser Enabled) share common routines/methods. These were developmed in a seperate class and include the appropriate assembly settings (see example). In addition the class is signed. The class is referenced and its properties set as include locally. he class is then referenced within the code of an Infopath Using Visual Studio.When debugged/executed locally the form renders and the calcs. within the Utilities class execuet as intended. However when published to Sharepoint and deployed as a .XSN, the form renders but none of the calcs within the Utils Class execute. Is there another step to deploying dependent classes?
Example Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.XPath;
using System.Diagnostics;
using System.Security;
using System.Security.Permissions;
[assembly: AllowPartiallyTrustedCallers]
namespace com.example.utils
{
public class Utils
{
public Utils()
{
}
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
public void DeleteNil(XPathNavigator node)
{
if (node.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
node.DeleteSelf();
}
}
}