[Mono-list] Re: DirectoryEntry call works on LINUX but not Windows 2000

Adam Tauno Williams adam at morrison-ind.com
Thu Mar 9 09:18:59 EST 2006

On Thu, 2006-03-09 at 08:47 +0100, Robert Jordan wrote:
> Adam Tauno Williams wrote:
> > I have a small application built on Mono (SuSe 10.0) that
> > works well on LINUX but on a Windows 2000 machine with .NET 1.1 the
> > DirectoryServices call -
> > if(eula.Properties.Contains("morrisonpreferencevalue"))
> > - where eula is a DirectoryEntry.
> > ... any pointers on what the cause of this might be?
> You forgot to attach the [STAThread] attribute to the
> main entry point of the application.

I added the "[STAThread]" to the entry point -
public static void Main(string[] argv)
	Application.Run(new EULA(argv));
- but it still fails at the same point with the same error message -
Unhandled Exception: System.Runtime.InteropServices.COMException
(0x80005000): Unknown error (0x80005000)
   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.PropertyCollection.Contains(String
   at MorrisonIndustries.EULAPopUp.EULAForm.LoadEULA()
   at MorrisonIndustries.EULAPopUp.EULAForm..ctor(String[] argv)
   at MorrisonIndustries.EULAPopUp.EULAForm.Main(String[] argv)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20060309/a29da3f9/attachment-0001.bin

More information about the Mono-list mailing list