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

Robert Jordan robertj at gmx.net
Thu Mar 9 02:47:49 EST 2006


Adam Tauno Williams wrote:
> I have a small application built on Mono 1.1.13.4-0.novell (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.
> 
> On Windows 2000 it fails with...
> 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 propertyName)
>    at MorrisonIndustries.EULAPopUp.EULAForm.LoadEULA()
>    at MorrisonIndustries.EULAPopUp.EULAForm..ctor(String[] argv)
>    at MorrisonIndustries.EULAPopUp.EULAForm.Main(String[] argv)
> 
> ... 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.

Robert




More information about the Mono-list mailing list