want to use a custom convertor class to convert an XML attribute I get the
following error:
System.Security.SecurityException: Request failed.
Basically I start with a DataSet that I then want to transform into HTML via
an XSL stylesheet.
I do not appear to be able to use the XsltArgumentList Extension Object.
From what I have found this object requires FULL TRUST.
If I comment out the args.AddExtensionObject("urn:trimble-date",
Convertor); the code works fine.
This code basically installs an extension object which in my case converts
date/times to a format that I want to use in my XSL
To make this worse this needs to run as part of a sharepoint application.
I have tried adjusting the security on the DLL that this code is part of and
it does not help.
Does anyone have any thoughts?
try
{
XmlDataDocument datadoc = new XmlDataDocument(ds);
XslTransform myXslTrans = new XslTransform() ;
myXslTrans.Load(XSLFileSpec);
// Add an object to convert DateTime format.
HelpdeskDateConvertor Convertor = new HelpdeskDateConvertor();
XsltArgumentList args = new XsltArgumentList();
args.AddExtensionObject("urn:trimble-date", Convertor);
myXslTrans.Transform(datadoc,null, stWrite,null);
}
catch(Exception ex)
{
stWrite.Write(ex.ToString());
}
Chris