473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Code Access Security - System.Security.SecurityException: Request failed.

I have written a Web User Control that runs inside of Sharepoint, but when I
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

Nov 21 '05 #1
0 1840

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MFRASER | last post by:
I am getting a System.Security.SecurityException when I try and laod a dataset from an xml file any ideas on what would cause this? System.Security.SecurityException' occurred in mscorlib.dll ...
1
by: Dave | last post by:
I have a ASP.net application that work fine with IIS 5.0. I'm trying to put it on IIS 6.0. And getting the following error. ASP is enable It is in a virtual directory - I also follow the...
0
by: Filippo Bettinaglio | last post by:
Security problem running unmanaged code (.ocx control) in a windows from control hosted in IE6 Hi, I have design a windows from control which contain a .OCX in one of its forms....
0
by: Lambuz | last post by:
Hi all, I've got this problem. I've to implemente a solution like the example in http://support.microsoft.com/default.aspx?scid=kb;EN-US;313891, but I can't configure correctly the example. ...
3
by: Lambuz | last post by:
Hi all, I've got this problem. I've to implemente a solution like the example in http://support.microsoft.com/default.aspx?scid=kb;EN-US;313891, but I can't configure correctly the example. ...
3
by: =?Utf-8?B?dG9ieQ==?= | last post by:
Our company deploys our .NET 2.0 apps to a network drive for them to be run. We are having issues with security in getting these to run. Below is a sample output for a job that is trying to call a...
1
by: trs | last post by:
Hi, If anyone could please throw some light on how I can solve this error. Have tried giving permission to the folder. Description: The application attempted to perform an operation not...
4
by: =?Utf-8?B?QXZhRGV2?= | last post by:
ASP.Net 2. We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003 32 Bit with IIS 6. A few library classes we wrote uses impersonation in code like explained in this...
2
by: =?Utf-8?B?c2tpdHpzb2ZyZW5pY2s=?= | last post by:
This is my first time posting an issue with .net, I hope this is the place. Basically, have websites that are throwing security exceptions that I am trying to resolve in IIS7 on win 2k8 64bit. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.