XSLT and trusted files

S

super todd

Here is the deal. We have an ASP.NET page which does an XSLT
transform. Both the XSL and the XML come off a unc path on another
server. All annonymous accaess has been permissioned accordingly. In
addition aspnet_setreg.exe has been downloaded and been run to give the
applications the appropriate permissions.

I feel it has something to do with trusted sites. If I change the code
to pass evidence to the XslTransform load (the good code) it all works
jim dandy and such. Unfortunately, I am unable to modify the code in
production and need to solve this at a machine.config / web.congig / OS
level. Any help would be greatly appreciated.

Thank you

Todd

***** BAD CODE *****
*************************
XslTransform xslt = new XslTransform();
xslt.Load(uncPath);
xslt.Transform(doc, xslArg, tw, null);
string result = sb.ToString();
Response.Write(result);

***** GOOD CODE *****
*************************
XmlDocument d = new XmlDocument() ;
d.Load(uncPath)
XslTransform xslt = new XslTransform();
xslt.Load((IXPathNavigable)d, null, this.GetType().Assembly.Evidence);
xslt.Transform(doc, xslArg, tw, null);
string result = sb.ToString();
Response.Write(result);
 
S

super todd

ALSO MY TRUST LEVELS:

<location allowOverride="true">
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal" />
<trustLevel name="High"
policyFile="web_hightrust.config" />
<trustLevel name="Medium"
policyFile="web_mediumtrust.config" />
<trustLevel name="Low"
policyFile="web_lowtrust.config" />
<trustLevel name="Minimal"
policyFile="web_minimaltrust.config" />
</securityPolicy>

<!-- level="[Full|High|Medium|Low|Minimal]" -->
<trust level="Full" originUrl="" />

</system.web>
</location>
 
T

todd

ALSO MY TRUST LEVELS:

<location allowOverride="true">
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal" />
<trustLevel name="High"
policyFile="web_hightrust.config" />
<trustLevel name="Medium"
policyFile="web_mediumtrust.config" />
<trustLevel name="Low"
policyFile="web_lowtrust.config" />
<trustLevel name="Minimal"
policyFile="web_minimaltrust.config" />
</securityPolicy>

<!-- level="[Full|High|Medium|Low|Minimal]" -->
<trust level="Full" originUrl="" />

</system.web>
</location>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,068
Latest member
MakersCBDIngredients

Latest Threads

Top