problem when listing evidences

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
 
M

Mike Schilling

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.
 

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

Top