By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,239 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,239 IT Pros & Developers. It's quick & easy.

VB .Net with ADSI problem

P: n/a
I am trying to develop an app using ADSI. I have the following code:

Dim ADSUser As IADsUser

ADSUser = GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")

MessageBox.Show(ADSUser.EmailAddress)

When i try and run the program, i get the following error:

Cannot create ActiveX component

Any ideas what is causing this?
Mar 30 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
what is your domain, and development machine, win2000?
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
I am trying to develop an app using ADSI. I have the following code:

Dim ADSUser As IADsUser

ADSUser = GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")

MessageBox.Show(ADSUser.EmailAddress)

When i try and run the program, i get the following error:

Cannot create ActiveX component

Any ideas what is causing this?

Mar 30 '06 #2

P: n/a
I am developing on a Windows XP desktop connected to our domain. The domain
controller is a Windows 2003 server machine

"Alexey Smirnov" wrote:
what is your domain, and development machine, win2000?
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
I am trying to develop an app using ADSI. I have the following code:

Dim ADSUser As IADsUser

ADSUser = GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")

MessageBox.Show(ADSUser.EmailAddress)

When i try and run the program, i get the following error:

Cannot create ActiveX component

Any ideas what is causing this?


Mar 30 '06 #3

P: n/a
I got it, you shouldn't use old VB-GetObject function, use
System.DirectoryServices
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.com...
I am developing on a Windows XP desktop connected to our domain. The domain
controller is a Windows 2003 server machine

"Alexey Smirnov" wrote:
what is your domain, and development machine, win2000?
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:66**********************************@microsof t.com...
>I am trying to develop an app using ADSI. I have the following code:
>
> Dim ADSUser As IADsUser
>
> ADSUser =
> GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>
> MessageBox.Show(ADSUser.EmailAddress)
>
> When i try and run the program, i get the following error:
>
> Cannot create ActiveX component
>
> Any ideas what is causing this?


Mar 30 '06 #4

P: n/a
an example

Imports System.DirectoryServices

.....
Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New
DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")

Dim ADSUser As ActiveDs.IADsUser
ADSUser = myDirectoryEntry.NativeObject()

Regards,
"Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
news:ez****************@TK2MSFTNGP09.phx.gbl...
I got it, you shouldn't use old VB-GetObject function, use
System.DirectoryServices
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message news:81**********************************@microsof t.com...
I am developing on a Windows XP desktop connected to our domain. The
domain
controller is a Windows 2003 server machine

"Alexey Smirnov" wrote:
what is your domain, and development machine, win2000?
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:66**********************************@microsof t.com...
>I am trying to develop an app using ADSI. I have the following code:
>
> Dim ADSUser As IADsUser
>
> ADSUser =
> GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>
> MessageBox.Show(ADSUser.EmailAddress)
>
> When i try and run the program, i get the following error:
>
> Cannot create ActiveX component
>
> Any ideas what is causing this?


Mar 30 '06 #5

P: n/a
Thanks for that, i have made a little more progress now, but it is still not
working. I am getting "No such object on the server", but i know the object
exists as it is my user!!!!

The code is:

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://CN=""Jonathan
Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")

Dim ADSUser As ActiveDs.IADsUser
ADSUser = myDirectoryEntry.NativeObject()
MessageBox.Show(ADSUser.EmailAddress)

"Alexey Smirnov" wrote:
an example

Imports System.DirectoryServices

.....
Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New
DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")

Dim ADSUser As ActiveDs.IADsUser
ADSUser = myDirectoryEntry.NativeObject()

Regards,
"Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
news:ez****************@TK2MSFTNGP09.phx.gbl...
I got it, you shouldn't use old VB-GetObject function, use
System.DirectoryServices
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message news:81**********************************@microsof t.com...
I am developing on a Windows XP desktop connected to our domain. The
domain
controller is a Windows 2003 server machine

"Alexey Smirnov" wrote:

what is your domain, and development machine, win2000?
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:66**********************************@microsof t.com...
>I am trying to develop an app using ADSI. I have the following code:
>
> Dim ADSUser As IADsUser
>
> ADSUser =
> GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>
> MessageBox.Show(ADSUser.EmailAddress)
>
> When i try and run the program, i get the following error:
>
> Cannot create ActiveX component
>
> Any ideas what is causing this?



Mar 30 '06 #6

P: n/a
sorry, I think I told you more code than you needed

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://...")
Console.WriteLine("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

This code is working for me.

Please check

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
Thanks for that, i have made a little more progress now, but it is still
not
working. I am getting "No such object on the server", but i know the
object
exists as it is my user!!!!

The code is:

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://CN=""Jonathan
Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")

Dim ADSUser As ActiveDs.IADsUser
ADSUser = myDirectoryEntry.NativeObject()
MessageBox.Show(ADSUser.EmailAddress)

"Alexey Smirnov" wrote:
an example

Imports System.DirectoryServices

.....
Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New
DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")

Dim ADSUser As ActiveDs.IADsUser
ADSUser = myDirectoryEntry.NativeObject()

Regards,
"Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
news:ez****************@TK2MSFTNGP09.phx.gbl...
>I got it, you shouldn't use old VB-GetObject function, use
>System.DirectoryServices
>
>
> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
> message news:81**********************************@microsof t.com...
>>I am developing on a Windows XP desktop connected to our domain. The
>>domain
>> controller is a Windows 2003 server machine
>>
>> "Alexey Smirnov" wrote:
>>
>>> what is your domain, and development machine, win2000?
>>>
>>>
>>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>>> message
>>> news:66**********************************@microsof t.com...
>>> >I am trying to develop an app using ADSI. I have the following code:
>>> >
>>> > Dim ADSUser As IADsUser
>>> >
>>> > ADSUser =
>>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>>> >
>>> > MessageBox.Show(ADSUser.EmailAddress)
>>> >
>>> > When i try and run the program, i get the following error:
>>> >
>>> > Cannot create ActiveX component
>>> >
>>> > Any ideas what is causing this?
>>>
>>>
>>>
>
>


Mar 30 '06 #7

P: n/a
Sorry to be a pain, and i really appreciate your help. But, i am now getting
the message "a referral was returned from the server". The code is:

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
Smith,DC=sc-file,DC=servicecentre")
Console.WriteLine("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

"Alexey Smirnov" wrote:
sorry, I think I told you more code than you needed

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://...")
Console.WriteLine("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

This code is working for me.

Please check

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
Thanks for that, i have made a little more progress now, but it is still
not
working. I am getting "No such object on the server", but i know the
object
exists as it is my user!!!!

The code is:

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://CN=""Jonathan
Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")

Dim ADSUser As ActiveDs.IADsUser
ADSUser = myDirectoryEntry.NativeObject()
MessageBox.Show(ADSUser.EmailAddress)

"Alexey Smirnov" wrote:
an example

Imports System.DirectoryServices

.....
Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New
DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")

Dim ADSUser As ActiveDs.IADsUser
ADSUser = myDirectoryEntry.NativeObject()

Regards,
"Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
news:ez****************@TK2MSFTNGP09.phx.gbl...
>I got it, you shouldn't use old VB-GetObject function, use
>System.DirectoryServices
>
>
> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
> message news:81**********************************@microsof t.com...
>>I am developing on a Windows XP desktop connected to our domain. The
>>domain
>> controller is a Windows 2003 server machine
>>
>> "Alexey Smirnov" wrote:
>>
>>> what is your domain, and development machine, win2000?
>>>
>>>
>>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>>> message
>>> news:66**********************************@microsof t.com...
>>> >I am trying to develop an app using ADSI. I have the following code:
>>> >
>>> > Dim ADSUser As IADsUser
>>> >
>>> > ADSUser =
>>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>>> >
>>> > MessageBox.Show(ADSUser.EmailAddress)
>>> >
>>> > When i try and run the program, i get the following error:
>>> >
>>> > Cannot create ActiveX component
>>> >
>>> > Any ideas what is causing this?
>>>
>>>
>>>
>
>


Mar 30 '06 #8

P: n/a
Where do you use it, is it Windows app, or ASP.NET?
I tested it in WinForms application and my account has permissions to
request AD.

On which line you get that error?

BR,
Alexey
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:6A**********************************@microsof t.com...
Sorry to be a pain, and i really appreciate your help. But, i am now
getting
the message "a referral was returned from the server". The code is:

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
Smith,DC=sc-file,DC=servicecentre")
Console.WriteLine("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

"Alexey Smirnov" wrote:
sorry, I think I told you more code than you needed

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://...")
Console.WriteLine("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

This code is working for me.

Please check

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:D8**********************************@microsof t.com...
> Thanks for that, i have made a little more progress now, but it is
> still
> not
> working. I am getting "No such object on the server", but i know the
> object
> exists as it is my user!!!!
>
> The code is:
>
> Dim myDirectoryEntry As DirectoryEntry
> myDirectoryEntry = New DirectoryEntry("LDAP://CN=""Jonathan
> Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")
>
> Dim ADSUser As ActiveDs.IADsUser
> ADSUser = myDirectoryEntry.NativeObject()
>
>
> MessageBox.Show(ADSUser.EmailAddress)
>
>
>
> "Alexey Smirnov" wrote:
>
>> an example
>>
>> Imports System.DirectoryServices
>>
>> .....
>> Dim myDirectoryEntry As DirectoryEntry
>> myDirectoryEntry = New
>> DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>>
>> Dim ADSUser As ActiveDs.IADsUser
>> ADSUser = myDirectoryEntry.NativeObject()
>>
>> Regards,
>>
>>
>> "Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
>> news:ez****************@TK2MSFTNGP09.phx.gbl...
>> >I got it, you shouldn't use old VB-GetObject function, use
>> >System.DirectoryServices
>> >
>> >
>> > "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> > message news:81**********************************@microsof t.com...
>> >>I am developing on a Windows XP desktop connected to our domain. The
>> >>domain
>> >> controller is a Windows 2003 server machine
>> >>
>> >> "Alexey Smirnov" wrote:
>> >>
>> >>> what is your domain, and development machine, win2000?
>> >>>
>> >>>
>> >>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote
>> >>> in
>> >>> message
>> >>> news:66**********************************@microsof t.com...
>> >>> >I am trying to develop an app using ADSI. I have the following
>> >>> >code:
>> >>> >
>> >>> > Dim ADSUser As IADsUser
>> >>> >
>> >>> > ADSUser =
>> >>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >>> >
>> >>> > MessageBox.Show(ADSUser.EmailAddress)
>> >>> >
>> >>> > When i try and run the program, i get the following error:
>> >>> >
>> >>> > Cannot create ActiveX component
>> >>> >
>> >>> > Any ideas what is causing this?
>> >>>
>> >>>
>> >>>
>> >
>> >
>>
>>
>>


Mar 30 '06 #9

P: n/a
The error is occurring on this line:
Console.Write("EmailAddress: " & myDirectoryEntry.Properties("mail").Value)

i have tried running the code as an administrative user, but get the same
result

"Alexey Smirnov" wrote:
Where do you use it, is it Windows app, or ASP.NET?
I tested it in WinForms application and my account has permissions to
request AD.

On which line you get that error?

BR,
Alexey
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:6A**********************************@microsof t.com...
Sorry to be a pain, and i really appreciate your help. But, i am now
getting
the message "a referral was returned from the server". The code is:

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
Smith,DC=sc-file,DC=servicecentre")
Console.WriteLine("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

"Alexey Smirnov" wrote:
sorry, I think I told you more code than you needed

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://...")
Console.WriteLine("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

This code is working for me.

Please check

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:D8**********************************@microsof t.com...
> Thanks for that, i have made a little more progress now, but it is
> still
> not
> working. I am getting "No such object on the server", but i know the
> object
> exists as it is my user!!!!
>
> The code is:
>
> Dim myDirectoryEntry As DirectoryEntry
> myDirectoryEntry = New DirectoryEntry("LDAP://CN=""Jonathan
> Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")
>
> Dim ADSUser As ActiveDs.IADsUser
> ADSUser = myDirectoryEntry.NativeObject()
>
>
> MessageBox.Show(ADSUser.EmailAddress)
>
>
>
> "Alexey Smirnov" wrote:
>
>> an example
>>
>> Imports System.DirectoryServices
>>
>> .....
>> Dim myDirectoryEntry As DirectoryEntry
>> myDirectoryEntry = New
>> DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>>
>> Dim ADSUser As ActiveDs.IADsUser
>> ADSUser = myDirectoryEntry.NativeObject()
>>
>> Regards,
>>
>>
>> "Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
>> news:ez****************@TK2MSFTNGP09.phx.gbl...
>> >I got it, you shouldn't use old VB-GetObject function, use
>> >System.DirectoryServices
>> >
>> >
>> > "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> > message news:81**********************************@microsof t.com...
>> >>I am developing on a Windows XP desktop connected to our domain. The
>> >>domain
>> >> controller is a Windows 2003 server machine
>> >>
>> >> "Alexey Smirnov" wrote:
>> >>
>> >>> what is your domain, and development machine, win2000?
>> >>>
>> >>>
>> >>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote
>> >>> in
>> >>> message
>> >>> news:66**********************************@microsof t.com...
>> >>> >I am trying to develop an app using ADSI. I have the following
>> >>> >code:
>> >>> >
>> >>> > Dim ADSUser As IADsUser
>> >>> >
>> >>> > ADSUser =
>> >>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >>> >
>> >>> > MessageBox.Show(ADSUser.EmailAddress)
>> >>> >
>> >>> > When i try and run the program, i get the following error:
>> >>> >
>> >>> > Cannot create ActiveX component
>> >>> >
>> >>> > Any ideas what is causing this?
>> >>>
>> >>>
>> >>>
>> >
>> >
>>
>>
>>


Mar 30 '06 #10

P: n/a
well, then try to enumerate all properties at your entry

add this code
Dim p As String

Dim v As Object

For Each p In myDirectoryEntry.Properties.PropertyNames

For Each v In myDirectoryEntry.Properties(p)

Console.WriteLine(p & "=" & v.ToString)

Next v

Next p

instead the Console.Write("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

You should get a list of properties/values in the Console Window

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
The error is occurring on this line:
Console.Write("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

i have tried running the code as an administrative user, but get the same
result

"Alexey Smirnov" wrote:
Where do you use it, is it Windows app, or ASP.NET?
I tested it in WinForms application and my account has permissions to
request AD.

On which line you get that error?

BR,
Alexey
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:6A**********************************@microsof t.com...
> Sorry to be a pain, and i really appreciate your help. But, i am now
> getting
> the message "a referral was returned from the server". The code is:
>
> Dim myDirectoryEntry As DirectoryEntry
> myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
> Smith,DC=sc-file,DC=servicecentre")
> Console.WriteLine("EmailAddress: " &
> myDirectoryEntry.Properties("mail").Value)
>
> "Alexey Smirnov" wrote:
>
>> sorry, I think I told you more code than you needed
>>
>> Dim myDirectoryEntry As DirectoryEntry
>> myDirectoryEntry = New DirectoryEntry("LDAP://...")
>> Console.WriteLine("EmailAddress: " &
>> myDirectoryEntry.Properties("mail").Value)
>>
>> This code is working for me.
>>
>> Please check
>>
>>
>>
>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> message
>> news:D8**********************************@microsof t.com...
>> > Thanks for that, i have made a little more progress now, but it is
>> > still
>> > not
>> > working. I am getting "No such object on the server", but i know the
>> > object
>> > exists as it is my user!!!!
>> >
>> > The code is:
>> >
>> > Dim myDirectoryEntry As DirectoryEntry
>> > myDirectoryEntry = New DirectoryEntry("LDAP://CN=""Jonathan
>> > Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")
>> >
>> > Dim ADSUser As ActiveDs.IADsUser
>> > ADSUser = myDirectoryEntry.NativeObject()
>> >
>> >
>> > MessageBox.Show(ADSUser.EmailAddress)
>> >
>> >
>> >
>> > "Alexey Smirnov" wrote:
>> >
>> >> an example
>> >>
>> >> Imports System.DirectoryServices
>> >>
>> >> .....
>> >> Dim myDirectoryEntry As DirectoryEntry
>> >> myDirectoryEntry = New
>> >> DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >>
>> >> Dim ADSUser As ActiveDs.IADsUser
>> >> ADSUser = myDirectoryEntry.NativeObject()
>> >>
>> >> Regards,
>> >>
>> >>
>> >> "Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
>> >> news:ez****************@TK2MSFTNGP09.phx.gbl...
>> >> >I got it, you shouldn't use old VB-GetObject function, use
>> >> >System.DirectoryServices
>> >> >
>> >> >
>> >> > "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote
>> >> > in
>> >> > message
>> >> > news:81**********************************@microsof t.com...
>> >> >>I am developing on a Windows XP desktop connected to our domain.
>> >> >>The
>> >> >>domain
>> >> >> controller is a Windows 2003 server machine
>> >> >>
>> >> >> "Alexey Smirnov" wrote:
>> >> >>
>> >> >>> what is your domain, and development machine, win2000?
>> >> >>>
>> >> >>>
>> >> >>> "Jonathan Smith" <Jo***********@discussions.microsoft.com>
>> >> >>> wrote
>> >> >>> in
>> >> >>> message
>> >> >>> news:66**********************************@microsof t.com...
>> >> >>> >I am trying to develop an app using ADSI. I have the following
>> >> >>> >code:
>> >> >>> >
>> >> >>> > Dim ADSUser As IADsUser
>> >> >>> >
>> >> >>> > ADSUser =
>> >> >>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >>> >
>> >> >>> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >>> >
>> >> >>> > When i try and run the program, i get the following error:
>> >> >>> >
>> >> >>> > Cannot create ActiveX component
>> >> >>> >
>> >> >>> > Any ideas what is causing this?
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>


Mar 30 '06 #11

P: n/a
Yeah, that seems to have worked. I reckon the problem is my LDAP query is
wrong. I will spend some time sorting the query syntax now.

Thanks for all your help

"Alexey Smirnov" wrote:
well, then try to enumerate all properties at your entry

add this code
Dim p As String

Dim v As Object

For Each p In myDirectoryEntry.Properties.PropertyNames

For Each v In myDirectoryEntry.Properties(p)

Console.WriteLine(p & "=" & v.ToString)

Next v

Next p

instead the Console.Write("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

You should get a list of properties/values in the Console Window

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
The error is occurring on this line:
Console.Write("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

i have tried running the code as an administrative user, but get the same
result

"Alexey Smirnov" wrote:
Where do you use it, is it Windows app, or ASP.NET?
I tested it in WinForms application and my account has permissions to
request AD.

On which line you get that error?

BR,
Alexey
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:6A**********************************@microsof t.com...
> Sorry to be a pain, and i really appreciate your help. But, i am now
> getting
> the message "a referral was returned from the server". The code is:
>
> Dim myDirectoryEntry As DirectoryEntry
> myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
> Smith,DC=sc-file,DC=servicecentre")
> Console.WriteLine("EmailAddress: " &
> myDirectoryEntry.Properties("mail").Value)
>
> "Alexey Smirnov" wrote:
>
>> sorry, I think I told you more code than you needed
>>
>> Dim myDirectoryEntry As DirectoryEntry
>> myDirectoryEntry = New DirectoryEntry("LDAP://...")
>> Console.WriteLine("EmailAddress: " &
>> myDirectoryEntry.Properties("mail").Value)
>>
>> This code is working for me.
>>
>> Please check
>>
>>
>>
>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> message
>> news:D8**********************************@microsof t.com...
>> > Thanks for that, i have made a little more progress now, but it is
>> > still
>> > not
>> > working. I am getting "No such object on the server", but i know the
>> > object
>> > exists as it is my user!!!!
>> >
>> > The code is:
>> >
>> > Dim myDirectoryEntry As DirectoryEntry
>> > myDirectoryEntry = New DirectoryEntry("LDAP://CN=""Jonathan
>> > Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")
>> >
>> > Dim ADSUser As ActiveDs.IADsUser
>> > ADSUser = myDirectoryEntry.NativeObject()
>> >
>> >
>> > MessageBox.Show(ADSUser.EmailAddress)
>> >
>> >
>> >
>> > "Alexey Smirnov" wrote:
>> >
>> >> an example
>> >>
>> >> Imports System.DirectoryServices
>> >>
>> >> .....
>> >> Dim myDirectoryEntry As DirectoryEntry
>> >> myDirectoryEntry = New
>> >> DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >>
>> >> Dim ADSUser As ActiveDs.IADsUser
>> >> ADSUser = myDirectoryEntry.NativeObject()
>> >>
>> >> Regards,
>> >>
>> >>
>> >> "Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
>> >> news:ez****************@TK2MSFTNGP09.phx.gbl...
>> >> >I got it, you shouldn't use old VB-GetObject function, use
>> >> >System.DirectoryServices
>> >> >
>> >> >
>> >> > "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote
>> >> > in
>> >> > message
>> >> > news:81**********************************@microsof t.com...
>> >> >>I am developing on a Windows XP desktop connected to our domain.
>> >> >>The
>> >> >>domain
>> >> >> controller is a Windows 2003 server machine
>> >> >>
>> >> >> "Alexey Smirnov" wrote:
>> >> >>
>> >> >>> what is your domain, and development machine, win2000?
>> >> >>>
>> >> >>>
>> >> >>> "Jonathan Smith" <Jo***********@discussions.microsoft.com>
>> >> >>> wrote
>> >> >>> in
>> >> >>> message
>> >> >>> news:66**********************************@microsof t.com...
>> >> >>> >I am trying to develop an app using ADSI. I have the following
>> >> >>> >code:
>> >> >>> >
>> >> >>> > Dim ADSUser As IADsUser
>> >> >>> >
>> >> >>> > ADSUser =
>> >> >>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >>> >
>> >> >>> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >>> >
>> >> >>> > When i try and run the program, i get the following error:
>> >> >>> >
>> >> >>> > Cannot create ActiveX component
>> >> >>> >
>> >> >>> > Any ideas what is causing this?
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>


Mar 30 '06 #12

P: n/a
great :-)

I'd recommend you to use LDAP browser, where you can check schemas of your
directory

the free version could be found at
http://www.ldapadministrator.com/download/index.php

BR,
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
Yeah, that seems to have worked. I reckon the problem is my LDAP query is
wrong. I will spend some time sorting the query syntax now.

Thanks for all your help

"Alexey Smirnov" wrote:
well, then try to enumerate all properties at your entry

add this code
Dim p As String

Dim v As Object

For Each p In myDirectoryEntry.Properties.PropertyNames

For Each v In myDirectoryEntry.Properties(p)

Console.WriteLine(p & "=" & v.ToString)

Next v

Next p

instead the Console.Write("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

You should get a list of properties/values in the Console Window

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:1E**********************************@microsof t.com...
> The error is occurring on this line:
> Console.Write("EmailAddress: " &
> myDirectoryEntry.Properties("mail").Value)
>
> i have tried running the code as an administrative user, but get the
> same
> result
>
> "Alexey Smirnov" wrote:
>
>> Where do you use it, is it Windows app, or ASP.NET?
>> I tested it in WinForms application and my account has permissions to
>> request AD.
>>
>> On which line you get that error?
>>
>> BR,
>> Alexey
>>
>>
>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> message
>> news:6A**********************************@microsof t.com...
>> > Sorry to be a pain, and i really appreciate your help. But, i am now
>> > getting
>> > the message "a referral was returned from the server". The code is:
>> >
>> > Dim myDirectoryEntry As DirectoryEntry
>> > myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
>> > Smith,DC=sc-file,DC=servicecentre")
>> > Console.WriteLine("EmailAddress: " &
>> > myDirectoryEntry.Properties("mail").Value)
>> >
>> > "Alexey Smirnov" wrote:
>> >
>> >> sorry, I think I told you more code than you needed
>> >>
>> >> Dim myDirectoryEntry As DirectoryEntry
>> >> myDirectoryEntry = New DirectoryEntry("LDAP://...")
>> >> Console.WriteLine("EmailAddress: " &
>> >> myDirectoryEntry.Properties("mail").Value)
>> >>
>> >> This code is working for me.
>> >>
>> >> Please check
>> >>
>> >>
>> >>
>> >> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> >> message
>> >> news:D8**********************************@microsof t.com...
>> >> > Thanks for that, i have made a little more progress now, but it
>> >> > is
>> >> > still
>> >> > not
>> >> > working. I am getting "No such object on the server", but i know
>> >> > the
>> >> > object
>> >> > exists as it is my user!!!!
>> >> >
>> >> > The code is:
>> >> >
>> >> > Dim myDirectoryEntry As DirectoryEntry
>> >> > myDirectoryEntry = New
>> >> > DirectoryEntry("LDAP://CN=""Jonathan
>> >> > Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")
>> >> >
>> >> > Dim ADSUser As ActiveDs.IADsUser
>> >> > ADSUser = myDirectoryEntry.NativeObject()
>> >> >
>> >> >
>> >> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >
>> >> >
>> >> >
>> >> > "Alexey Smirnov" wrote:
>> >> >
>> >> >> an example
>> >> >>
>> >> >> Imports System.DirectoryServices
>> >> >>
>> >> >> .....
>> >> >> Dim myDirectoryEntry As DirectoryEntry
>> >> >> myDirectoryEntry = New
>> >> >> DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >>
>> >> >> Dim ADSUser As ActiveDs.IADsUser
>> >> >> ADSUser = myDirectoryEntry.NativeObject()
>> >> >>
>> >> >> Regards,
>> >> >>
>> >> >>
>> >> >> "Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
>> >> >> news:ez****************@TK2MSFTNGP09.phx.gbl...
>> >> >> >I got it, you shouldn't use old VB-GetObject function, use
>> >> >> >System.DirectoryServices
>> >> >> >
>> >> >> >
>> >> >> > "Jonathan Smith" <Jo***********@discussions.microsoft.com>
>> >> >> > wrote
>> >> >> > in
>> >> >> > message
>> >> >> > news:81**********************************@microsof t.com...
>> >> >> >>I am developing on a Windows XP desktop connected to our
>> >> >> >>domain.
>> >> >> >>The
>> >> >> >>domain
>> >> >> >> controller is a Windows 2003 server machine
>> >> >> >>
>> >> >> >> "Alexey Smirnov" wrote:
>> >> >> >>
>> >> >> >>> what is your domain, and development machine, win2000?
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> "Jonathan Smith" <Jo***********@discussions.microsoft.com>
>> >> >> >>> wrote
>> >> >> >>> in
>> >> >> >>> message
>> >> >> >>> news:66**********************************@microsof t.com...
>> >> >> >>> >I am trying to develop an app using ADSI. I have the
>> >> >> >>> >following
>> >> >> >>> >code:
>> >> >> >>> >
>> >> >> >>> > Dim ADSUser As IADsUser
>> >> >> >>> >
>> >> >> >>> > ADSUser =
>> >> >> >>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >> >>> >
>> >> >> >>> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >> >>> >
>> >> >> >>> > When i try and run the program, i get the following error:
>> >> >> >>> >
>> >> >> >>> > Cannot create ActiveX component
>> >> >> >>> >
>> >> >> >>> > Any ideas what is causing this?
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Mar 30 '06 #13

P: n/a
THanks for that. What i am trying to achieve is to create a Windows
"dashboard" that will give me key data about my Exchange server.

Is this achievable by doing LDAP queries on my mail server?

I want to know things like "who is the domain mail server", what version of
exchange is it running, database path etc...

"Alexey Smirnov" wrote:
great :-)

I'd recommend you to use LDAP browser, where you can check schemas of your
directory

the free version could be found at
http://www.ldapadministrator.com/download/index.php

BR,
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
Yeah, that seems to have worked. I reckon the problem is my LDAP query is
wrong. I will spend some time sorting the query syntax now.

Thanks for all your help

"Alexey Smirnov" wrote:
well, then try to enumerate all properties at your entry

add this code
Dim p As String

Dim v As Object

For Each p In myDirectoryEntry.Properties.PropertyNames

For Each v In myDirectoryEntry.Properties(p)

Console.WriteLine(p & "=" & v.ToString)

Next v

Next p

instead the Console.Write("EmailAddress: " &
myDirectoryEntry.Properties("mail").Value)

You should get a list of properties/values in the Console Window

"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:1E**********************************@microsof t.com...
> The error is occurring on this line:
> Console.Write("EmailAddress: " &
> myDirectoryEntry.Properties("mail").Value)
>
> i have tried running the code as an administrative user, but get the
> same
> result
>
> "Alexey Smirnov" wrote:
>
>> Where do you use it, is it Windows app, or ASP.NET?
>> I tested it in WinForms application and my account has permissions to
>> request AD.
>>
>> On which line you get that error?
>>
>> BR,
>> Alexey
>>
>>
>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> message
>> news:6A**********************************@microsof t.com...
>> > Sorry to be a pain, and i really appreciate your help. But, i am now
>> > getting
>> > the message "a referral was returned from the server". The code is:
>> >
>> > Dim myDirectoryEntry As DirectoryEntry
>> > myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
>> > Smith,DC=sc-file,DC=servicecentre")
>> > Console.WriteLine("EmailAddress: " &
>> > myDirectoryEntry.Properties("mail").Value)
>> >
>> > "Alexey Smirnov" wrote:
>> >
>> >> sorry, I think I told you more code than you needed
>> >>
>> >> Dim myDirectoryEntry As DirectoryEntry
>> >> myDirectoryEntry = New DirectoryEntry("LDAP://...")
>> >> Console.WriteLine("EmailAddress: " &
>> >> myDirectoryEntry.Properties("mail").Value)
>> >>
>> >> This code is working for me.
>> >>
>> >> Please check
>> >>
>> >>
>> >>
>> >> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> >> message
>> >> news:D8**********************************@microsof t.com...
>> >> > Thanks for that, i have made a little more progress now, but it
>> >> > is
>> >> > still
>> >> > not
>> >> > working. I am getting "No such object on the server", but i know
>> >> > the
>> >> > object
>> >> > exists as it is my user!!!!
>> >> >
>> >> > The code is:
>> >> >
>> >> > Dim myDirectoryEntry As DirectoryEntry
>> >> > myDirectoryEntry = New
>> >> > DirectoryEntry("LDAP://CN=""Jonathan
>> >> > Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")
>> >> >
>> >> > Dim ADSUser As ActiveDs.IADsUser
>> >> > ADSUser = myDirectoryEntry.NativeObject()
>> >> >
>> >> >
>> >> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >
>> >> >
>> >> >
>> >> > "Alexey Smirnov" wrote:
>> >> >
>> >> >> an example
>> >> >>
>> >> >> Imports System.DirectoryServices
>> >> >>
>> >> >> .....
>> >> >> Dim myDirectoryEntry As DirectoryEntry
>> >> >> myDirectoryEntry = New
>> >> >> DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >>
>> >> >> Dim ADSUser As ActiveDs.IADsUser
>> >> >> ADSUser = myDirectoryEntry.NativeObject()
>> >> >>
>> >> >> Regards,
>> >> >>
>> >> >>
>> >> >> "Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
>> >> >> news:ez****************@TK2MSFTNGP09.phx.gbl...
>> >> >> >I got it, you shouldn't use old VB-GetObject function, use
>> >> >> >System.DirectoryServices
>> >> >> >
>> >> >> >
>> >> >> > "Jonathan Smith" <Jo***********@discussions.microsoft.com>
>> >> >> > wrote
>> >> >> > in
>> >> >> > message
>> >> >> > news:81**********************************@microsof t.com...
>> >> >> >>I am developing on a Windows XP desktop connected to our
>> >> >> >>domain.
>> >> >> >>The
>> >> >> >>domain
>> >> >> >> controller is a Windows 2003 server machine
>> >> >> >>
>> >> >> >> "Alexey Smirnov" wrote:
>> >> >> >>
>> >> >> >>> what is your domain, and development machine, win2000?
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> "Jonathan Smith" <Jo***********@discussions.microsoft.com>
>> >> >> >>> wrote
>> >> >> >>> in
>> >> >> >>> message
>> >> >> >>> news:66**********************************@microsof t.com...
>> >> >> >>> >I am trying to develop an app using ADSI. I have the
>> >> >> >>> >following
>> >> >> >>> >code:
>> >> >> >>> >
>> >> >> >>> > Dim ADSUser As IADsUser
>> >> >> >>> >
>> >> >> >>> > ADSUser =
>> >> >> >>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >> >>> >
>> >> >> >>> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >> >>> >
>> >> >> >>> > When i try and run the program, i get the following error:
>> >> >> >>> >
>> >> >> >>> > Cannot create ActiveX component
>> >> >> >>> >
>> >> >> >>> > Any ideas what is causing this?
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Mar 30 '06 #14

P: n/a
yes, if you have permissions to do that
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
THanks for that. What i am trying to achieve is to create a Windows
"dashboard" that will give me key data about my Exchange server.

Is this achievable by doing LDAP queries on my mail server?

I want to know things like "who is the domain mail server", what version
of
exchange is it running, database path etc...

"Alexey Smirnov" wrote:
great :-)

I'd recommend you to use LDAP browser, where you can check schemas of
your
directory

the free version could be found at
http://www.ldapadministrator.com/download/index.php

BR,
"Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
message
news:11**********************************@microsof t.com...
> Yeah, that seems to have worked. I reckon the problem is my LDAP query
> is
> wrong. I will spend some time sorting the query syntax now.
>
> Thanks for all your help
>
> "Alexey Smirnov" wrote:
>
>> well, then try to enumerate all properties at your entry
>>
>> add this code
>> Dim p As String
>>
>> Dim v As Object
>>
>> For Each p In myDirectoryEntry.Properties.PropertyNames
>>
>> For Each v In myDirectoryEntry.Properties(p)
>>
>> Console.WriteLine(p & "=" & v.ToString)
>>
>> Next v
>>
>> Next p
>>
>> instead the Console.Write("EmailAddress: " &
>> myDirectoryEntry.Properties("mail").Value)
>>
>> You should get a list of properties/values in the Console Window
>>
>>
>>
>> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> message
>> news:1E**********************************@microsof t.com...
>> > The error is occurring on this line:
>> > Console.Write("EmailAddress: " &
>> > myDirectoryEntry.Properties("mail").Value)
>> >
>> > i have tried running the code as an administrative user, but get the
>> > same
>> > result
>> >
>> > "Alexey Smirnov" wrote:
>> >
>> >> Where do you use it, is it Windows app, or ASP.NET?
>> >> I tested it in WinForms application and my account has permissions
>> >> to
>> >> request AD.
>> >>
>> >> On which line you get that error?
>> >>
>> >> BR,
>> >> Alexey
>> >>
>> >>
>> >> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote in
>> >> message
>> >> news:6A**********************************@microsof t.com...
>> >> > Sorry to be a pain, and i really appreciate your help. But, i am
>> >> > now
>> >> > getting
>> >> > the message "a referral was returned from the server". The code
>> >> > is:
>> >> >
>> >> > Dim myDirectoryEntry As DirectoryEntry
>> >> > myDirectoryEntry = New DirectoryEntry("LDAP://CN=Jonathan
>> >> > Smith,DC=sc-file,DC=servicecentre")
>> >> > Console.WriteLine("EmailAddress: " &
>> >> > myDirectoryEntry.Properties("mail").Value)
>> >> >
>> >> > "Alexey Smirnov" wrote:
>> >> >
>> >> >> sorry, I think I told you more code than you needed
>> >> >>
>> >> >> Dim myDirectoryEntry As DirectoryEntry
>> >> >> myDirectoryEntry = New DirectoryEntry("LDAP://...")
>> >> >> Console.WriteLine("EmailAddress: " &
>> >> >> myDirectoryEntry.Properties("mail").Value)
>> >> >>
>> >> >> This code is working for me.
>> >> >>
>> >> >> Please check
>> >> >>
>> >> >>
>> >> >>
>> >> >> "Jonathan Smith" <Jo***********@discussions.microsoft.com> wrote
>> >> >> in
>> >> >> message
>> >> >> news:D8**********************************@microsof t.com...
>> >> >> > Thanks for that, i have made a little more progress now, but
>> >> >> > it
>> >> >> > is
>> >> >> > still
>> >> >> > not
>> >> >> > working. I am getting "No such object on the server", but i
>> >> >> > know
>> >> >> > the
>> >> >> > object
>> >> >> > exists as it is my user!!!!
>> >> >> >
>> >> >> > The code is:
>> >> >> >
>> >> >> > Dim myDirectoryEntry As DirectoryEntry
>> >> >> > myDirectoryEntry = New
>> >> >> > DirectoryEntry("LDAP://CN=""Jonathan
>> >> >> > Smith"",CN=""Edmundson Users"",DC=SERVICECENTRE,DC=local")
>> >> >> >
>> >> >> > Dim ADSUser As ActiveDs.IADsUser
>> >> >> > ADSUser = myDirectoryEntry.NativeObject()
>> >> >> >
>> >> >> >
>> >> >> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "Alexey Smirnov" wrote:
>> >> >> >
>> >> >> >> an example
>> >> >> >>
>> >> >> >> Imports System.DirectoryServices
>> >> >> >>
>> >> >> >> .....
>> >> >> >> Dim myDirectoryEntry As DirectoryEntry
>> >> >> >> myDirectoryEntry = New
>> >> >> >> DirectoryEntry("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >> >>
>> >> >> >> Dim ADSUser As ActiveDs.IADsUser
>> >> >> >> ADSUser = myDirectoryEntry.NativeObject()
>> >> >> >>
>> >> >> >> Regards,
>> >> >> >>
>> >> >> >>
>> >> >> >> "Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in
>> >> >> >> message
>> >> >> >> news:ez****************@TK2MSFTNGP09.phx.gbl...
>> >> >> >> >I got it, you shouldn't use old VB-GetObject function, use
>> >> >> >> >System.DirectoryServices
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Jonathan Smith" <Jo***********@discussions.microsoft.com>
>> >> >> >> > wrote
>> >> >> >> > in
>> >> >> >> > message
>> >> >> >> > news:81**********************************@microsof t.com...
>> >> >> >> >>I am developing on a Windows XP desktop connected to our
>> >> >> >> >>domain.
>> >> >> >> >>The
>> >> >> >> >>domain
>> >> >> >> >> controller is a Windows 2003 server machine
>> >> >> >> >>
>> >> >> >> >> "Alexey Smirnov" wrote:
>> >> >> >> >>
>> >> >> >> >>> what is your domain, and development machine, win2000?
>> >> >> >> >>>
>> >> >> >> >>>
>> >> >> >> >>> "Jonathan Smith"
>> >> >> >> >>> <Jo***********@discussions.microsoft.com>
>> >> >> >> >>> wrote
>> >> >> >> >>> in
>> >> >> >> >>> message
>> >> >> >> >>> news:66**********************************@microsof t.com...
>> >> >> >> >>> >I am trying to develop an app using ADSI. I have the
>> >> >> >> >>> >following
>> >> >> >> >>> >code:
>> >> >> >> >>> >
>> >> >> >> >>> > Dim ADSUser As IADsUser
>> >> >> >> >>> >
>> >> >> >> >>> > ADSUser =
>> >> >> >> >>> > GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com")
>> >> >> >> >>> >
>> >> >> >> >>> > MessageBox.Show(ADSUser.EmailAddress)
>> >> >> >> >>> >
>> >> >> >> >>> > When i try and run the program, i get the following
>> >> >> >> >>> > error:
>> >> >> >> >>> >
>> >> >> >> >>> > Cannot create ActiveX component
>> >> >> >> >>> >
>> >> >> >> >>> > Any ideas what is causing this?
>> >> >> >> >>>
>> >> >> >> >>>
>> >> >> >> >>>
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Mar 30 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.