In 1.0, there was a method call:
XslTransform.Load(IXPathNavigable, XmlResolver)
In 1.1, compiling a call to it gives a warning that this signature is
obsolete and evidence should be suppied, that it, that a call to
XslTransform.Load(IXPathNavigable, XmlResolver, Evidence)
is preferred.
If I pass "null" as my evidence, bad things happen. Some of my custom XPath
functions, which do reflective calls on System.Xml.XPath classes, will then
fail with security violations. What sort of evidence do I provide to say
"run my XPath functions with the same privilege as any other code in this
assembly"? (I've looked at what the 2-argument form of Load does, and
there's no way to emulate it.) 4 2505
Since no one else responded, I guess I'll throw out a little, however i'd
suggest asking in security or xml groups for more sure answers.
I would think that to approve the set of permissions the current assembly
has, you would pass something like Assembly.GetCallingAssembly().Evidence to
the evidence parameter. There are probably better ways however, hopefully
someone will post and set us both straight.
"Mike Schilling" <ms*************@hotmail.com> wrote in message
news:eW**************@TK2MSFTNGP10.phx.gbl... In 1.0, there was a method call:
XslTransform.Load(IXPathNavigable, XmlResolver)
In 1.1, compiling a call to it gives a warning that this signature is obsolete and evidence should be suppied, that it, that a call to
XslTransform.Load(IXPathNavigable, XmlResolver, Evidence)
is preferred.
If I pass "null" as my evidence, bad things happen. Some of my custom
XPath functions, which do reflective calls on System.Xml.XPath classes, will
then fail with security violations. What sort of evidence do I provide to say "run my XPath functions with the same privilege as any other code in this assembly"? (I've looked at what the 2-argument form of Load does, and there's no way to emulate it.)
I use the following as the Evidience parameter successfully:
this.GetType().Assembly.Evidence
Michael R cr**@tampabay.rr.com
"Daniel O'Connell" <on******@comcast.net> wrote in message
news:pRR8b.440095$Ho3.71198@sccrnsc03... Since no one else responded, I guess I'll throw out a little, however i'd suggest asking in security or xml groups for more sure answers. I would think that to approve the set of permissions the current assembly has, you would pass something like Assembly.GetCallingAssembly().Evidence
to the evidence parameter. There are probably better ways however, hopefully someone will post and set us both straight. "Mike Schilling" <ms*************@hotmail.com> wrote in message news:eW**************@TK2MSFTNGP10.phx.gbl... In 1.0, there was a method call:
XslTransform.Load(IXPathNavigable, XmlResolver)
In 1.1, compiling a call to it gives a warning that this signature is obsolete and evidence should be suppied, that it, that a call to
XslTransform.Load(IXPathNavigable, XmlResolver, Evidence)
is preferred.
If I pass "null" as my evidence, bad things happen. Some of my custom XPath functions, which do reflective calls on System.Xml.XPath classes, will then fail with security violations. What sort of evidence do I provide to
say "run my XPath functions with the same privilege as any other code in
this assembly"? (I've looked at what the 2-argument form of Load does, and there's no way to emulate it.)
Yeah, that should work, however I don't know if there are security
implications to it, I suspect not, but I'm always a tad careful.
"Michael R" <cr**@tampabay.rr.com> wrote in message
news:uo**************@TK2MSFTNGP12.phx.gbl... I use the following as the Evidience parameter successfully: this.GetType().Assembly.Evidence
Michael R cr**@tampabay.rr.com
"Daniel O'Connell" <on******@comcast.net> wrote in message news:pRR8b.440095$Ho3.71198@sccrnsc03... Since no one else responded, I guess I'll throw out a little, however
i'd suggest asking in security or xml groups for more sure answers. I would think that to approve the set of permissions the current
assembly has, you would pass something like
Assembly.GetCallingAssembly().Evidence to the evidence parameter. There are probably better ways however,
hopefully someone will post and set us both straight. "Mike Schilling" <ms*************@hotmail.com> wrote in message news:eW**************@TK2MSFTNGP10.phx.gbl... In 1.0, there was a method call:
XslTransform.Load(IXPathNavigable, XmlResolver)
In 1.1, compiling a call to it gives a warning that this signature is obsolete and evidence should be suppied, that it, that a call to
XslTransform.Load(IXPathNavigable, XmlResolver, Evidence)
is preferred.
If I pass "null" as my evidence, bad things happen. Some of my custom XPath functions, which do reflective calls on System.Xml.XPath classes, will then fail with security violations. What sort of evidence do I provide to say "run my XPath functions with the same privilege as any other code in this assembly"? (I've looked at what the 2-argument form of Load does, and there's no way to emulate it.)
What you propose (well, actually Assembly.GetExecutingAssembly().Evidence)
works perfectly. No warnings and the functions run with no failures.
Thanks,
Mike
"Daniel O'Connell" <on******@comcast.net> wrote in message
news:pRR8b.440095$Ho3.71198@sccrnsc03... Since no one else responded, I guess I'll throw out a little, however i'd suggest asking in security or xml groups for more sure answers. I would think that to approve the set of permissions the current assembly has, you would pass something like Assembly.GetCallingAssembly().Evidence
to the evidence parameter. There are probably better ways however, hopefully someone will post and set us both straight.
"Mike Schilling" <ms*************@hotmail.com> wrote in message news:eW**************@TK2MSFTNGP10.phx.gbl... In 1.0, there was a method call:
XslTransform.Load(IXPathNavigable, XmlResolver)
In 1.1, compiling a call to it gives a warning that this signature is obsolete and evidence should be suppied, that it, that a call to
XslTransform.Load(IXPathNavigable, XmlResolver, Evidence)
is preferred.
If I pass "null" as my evidence, bad things happen. Some of my custom XPath functions, which do reflective calls on System.Xml.XPath classes, will then fail with security violations. What sort of evidence do I provide to
say "run my XPath functions with the same privilege as any other code in
this assembly"? (I've looked at what the 2-argument form of Load does, and there's no way to emulate it.)
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Graham Pengelly |
last post by:
Hi
I am trying to transform on System.Xml.XmlDocument into another using
XslTransform without writing the object out to a file. I am guessing it
should work something like this...
public...
|
by: Tod Johnson |
last post by:
Hello all,
not so long I've found really strange bug in the .NET. It seems that
Evidence that I've got from the current executing Assembly is somehow
expired (it happens suddenly after about...
|
by: Tod Johnson |
last post by:
Hello again,
Does it mean that nobody knows the answer? :(
-----------------------------------
not so long I've found really strange bug in the .NET. It seems that
Evidence that I've got from...
|
by: shell shell via .NET 247 |
last post by:
How do you get the underlying Xslt stylesheet content from an XslTransform object that has been created and loaded with a stylesheet file or some text?
Assume a method will create an XslTransform...
|
by: manlio |
last post by:
how can I load a XSL string (not an xsl file!!) with XslTransform ???
If I use the code:
// Create a new XslTransform class and load the stylesheet
XslTransform myXslTransform = new...
|
by: Tod Johnson |
last post by:
Not so long I've found really strange bug in the .NET. It seems that
Evidence that I've got from the current executing Assembly is somehow
expired (it happens suddenly after about month) and Xslt...
|
by: David S. Alexander |
last post by:
I am trying to transform XML to XML using an XSLT in C#, but the root node
of my XML is not being matched by the XSLT if it has an xmlns attribute. Am
I handling my namespaces incorrectly?
My C#...
|
by: rmgalante |
last post by:
Hello,
I have a VB.Net component that uses the XslTransform object. I am using
the FXSL randomizeList function in my XSL template. When I transform
the XML in the VB.Net component, my...
|
by: WT |
last post by:
Hello,
I have code created with .net 1.0 and migrated to 3.5.
Form 2.0 the XslTransform class is obsolete and the vs2008 compiler
generates warnings that these classes are absolete suggesting to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |