problem when listing evidences

  • Thread starter Thread starter fred
  • Start date Start date
F

fred

i wrote this small application:
----------------------------------------------
using System;
using System.Reflection;
using System.Collections;
using System.Security.Policy;

namespace SecTest
{
class DisplayEvidences
{
static void Main(string[] args)
{
Assembly assembly = Assembly.LoadFrom(args[0]);
enumerator = assembly.Evidence.GetEnumerator();
while (enumerator.MoveNext())
{
enumerator.Current.ToString();
}

Console.Read();
}
}
}
----------------------------------------------------

I also have a helloworld.exe test application.

But whatever the location of helloworld.exe (c:\,
C:\Inetpub\wwwroot, http:\\localhost ...) evidences are
never displayed.

Can anybody explain me why?

thank you for replying
 
fred said:
i wrote this small application:
----------------------------------------------
using System;
using System.Reflection;
using System.Collections;
using System.Security.Policy;

namespace SecTest
{
class DisplayEvidences
{
static void Main(string[] args)
{
Assembly assembly = Assembly.LoadFrom(args[0]);
enumerator = assembly.Evidence.GetEnumerator();
while (enumerator.MoveNext())
{
enumerator.Current.ToString();
}

Console.Read();
}
}
}
----------------------------------------------------

I also have a helloworld.exe test application.

But whatever the location of helloworld.exe (c:\,
C:\Inetpub\wwwroot, http:\\localhost ...) evidences are
never displayed.

Yes. You're converting the evidence to a string, but not printing that
string.
 
Back
Top