Evidence bug?

Discussion in 'ASP .Net' started by Tod Johnson, Jan 20, 2005.

  1. Tod Johnson

    Tod Johnson Guest

    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 Transformation
    stop working at all for the whole AppDomain until I restart it. Am I
    using "this.GetType().Assembly.Evidence" incorrectly? And another
    question is what if I pass Evidence that I've created using
    CreateEvidenceForUrl(@"my working directory")? What is the diference
    between this evidence and evidence that I've retrieved from Assembly
    (this.GetType().Assembly.Evidence)?

    Here is the code snippet:

    XslTransform xt = new XslTransform();
    try
    {
    xt.Load(new XmlTextReader(stream), null,
    this.GetType().Assembly.Evidence);
    }
    catch(XsltCompileException ex)
    {
    throw new Exception(Utils.ExceptionsToString(ex), ex);
    }

    And here is the stacktrace:

    Exception: System.Security.Cryptography.CryptographicException
    Message: The parameter is incorrect.
    Source: mscorlib
    at System.Security.Policy.PolicyLevel.GenericResolve(Evidence
    evidence, Boolean& allConst)
    at System.Security.Policy.PolicyLevel.Resolve(Evidence evidence,
    Int32 count, Char[] serializedEvidence)
    at System.Security.PolicyManager.Resolve(Evidence evidence,
    PermissionSet request)
    at System.Security.SecurityManager.ResolvePolicy(Evidence evidence)
    at System.Xml.Xsl.Compiler.Compile(NavigatorInput input, XmlResolver
    xmlResolver, Evidence evidence)
    at System.Xml.Xsl.XslTransform.Compile(XPathNavigator stylesheet,
    XmlResolver resolver, Evidence evidence)
    at System.Xml.Xsl.XslTransform.Load(XPathNavigator stylesheet,
    XmlResolver resolver, Evidence evidence)
    at System.Xml.Xsl.XslTransform.Load(XmlReader stylesheet,
    XmlResolver resolver, Evidence evidence)

    Thanks in advance,
    Tod
     
    Tod Johnson, Jan 20, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Mathog

    Objective evidence comparing languages?

    David Mathog, Nov 10, 2005, in forum: C Programming
    Replies:
    5
    Views:
    288
    Jack Klein
    Nov 11, 2005
  2. David Mathog
    Replies:
    5
    Views:
    309
    Jack Klein
    Nov 11, 2005
  3. Midex
    Replies:
    35
    Views:
    888
    James Beck
    May 9, 2007
  4. commander zero rides

    evidence shows ped ophelia not harmful

    commander zero rides, Sep 15, 2007, in forum: Java
    Replies:
    6
    Views:
    313
    Richard Reynolds
    Sep 16, 2007
  5. Travis Newbury

    Just a little anecdotal evidence

    Travis Newbury, Jan 23, 2008, in forum: HTML
    Replies:
    130
    Views:
    2,634
    Ben C
    Feb 5, 2008
Loading...

Share This Page