GetCurrentProcess fails on Net 1.1 on Vista

This little snippet compiled with .Net 1.1:

using System;

using System.Diagnostics;

 
 

class Program

{

    static void Main(string[] args)

    {

        try

        {

            Process c = Process.GetCurrentProcess();

 
 

            Process[] p = Process.GetProcessesByName(c.ProcessName);

        }

        catch (Exception e)

        {

            Console.WriteLine(e.Message);

        }

    }

}

 
 

will fail on Vista as standard user and hence filtered admin with this error:

{"Couldn't get process information from remote machine."}

Compiling it under 2.0 will get you passed it.

 
 

Maarten