|
 |
asp_cdo thread: Unhide a user from Exchange Address list using ASP
Message #1 by "himanshu kumar" <hikumar52@w...> on Wed, 8 May 2002 15:54:27
|
|
Hi all,
I need one help regarding exchange server 2000.
How can i hide and unhide a user from Exhange Address list using ASP. I
have tried in VBP which is working fine but when i made the dll of that
vbp and accessing it from ASP dll is giving
"Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done. "
When i have tried in ASP code Using CDOExm.ImailRecipient and
CDO.Person it is giving undefined error.
Please help me to hide or unhide a user from Exchange Address list from
ASP.
Thanks
Himanshu Kumar
Software Engineer
Applabs India
Message #2 by "Siegfried Weber" <sweber@c...> on Fri, 10 May 2002 00:11:14 +0200
|
|
You simply need to set the hidden flag of the object with ADSI for
example like this (this sample creates a mail enabled user):
Set objRootDSE =3D GetObject("LDAP://RootDSE")
strDomainName =3D objRootDSE.Get("defaultNamingContext")
strContainer =3D "Users"
strLDAP =3D "LDAP://CN=3D" & strContainer & "," & strDomainName
Set objContainer =3D GetObject(strLDAP)
Set objUser =3D objContainer.Create("User", "CN=3D" & strLastName &
strFirstName)
With objUser
.Put "mailnickname", LEft(strAlias, 20)
.AccountDisabled =3D False
.SetPassword strPassword
.Put "displayName", strLastName & ", " & strFirstName
.Put "mail", strEmailAddress
.Put "userPrincipalName", strAlias & strUPNSuffix
.Put "sn", strLastName
.Put "givenName", strFirstName
.Put "sAMAccountName", Left(strAlias, 20)
.Put "msExchHideFromAddressLists", FALSE
End With
.SetInfo
(watch the line wraps)
<Siegfried />
> -----Original Message-----
> From: himanshu kumar [mailto:hikumar52@w...]
> Sent: Wednesday, May 08, 2002 5:54 PM
> To: ASP CDO
> Subject: [asp_cdo] Unhide a user from Exchange Address list using ASP
>
> Hi all,
>
>
> I need one help regarding exchange server 2000.
>
> How can i hide and unhide a user from Exhange Address list using ASP.
I
>
> have tried in VBP which is working fine but when i made the dll of
that
>
> vbp and accessing it from ASP dll is giving
>
> "Multiple-step OLE DB operation generated errors. Check each OLE DB
>
> status value, if available. No work was done. "
>
> When i have tried in ASP code Using CDOExm.ImailRecipient and
>
> CDO.Person it is giving undefined error.
>
> Please help me to hide or unhide a user from Exchange Address list
from
>
> ASP.
>
> Thanks
> Himanshu Kumar
> Software Engineer
> Applabs India
Message #3 by "himanshu kumar" <hikumar52@w...> on Thu, 9 May 2002 23:54:46 -0700
|
|
Hi Siegfried Weber,
Thanks for your mail regarding this soln. I need one more help from you. We have made a Web site to excess the mail of exchange
server. When we are hiding the user from Exchange address list we are not able to login to the site. Using this code we are able to
login into the exchange server. But when we are checking the Hide exchange from Address list option in User property -Exchange
advance window from Active directory interface it got unchecked.
But if u go throuh exchange server mail site (OWA), if that hide from Exchange address list is unchecked, user is able to login to
the site and can see the mail.
In our site first we are making the hide from Exchange address list as unhide in ASP and then giving the code for login, Which is
not good aproach.
Can i login without unhide the exchange address list in my site.
Please help me in this also
I will be thankful to u.
Thanks
Himanshu Kumar
Software Engineer
Applabs India
> [asp_cdo] RE: Unhide a user from Exchange Address list using ASPDate: Fri, 10 May 2002 00:11:14 +0200
> "Siegfried Weber" <sweber@c...> "ASP CDO" <asp_cdo@p...>Reply-To: "ASP CDO"
<asp_cdo@p...>
>
>You simply need to set the hidden flag of the object with ADSI for
>example like this (this sample creates a mail enabled user):
>
>Set objRootDSE = GetObject("LDAP://RootDSE")
>strDomainName = objRootDSE.Get("defaultNamingContext")
>strContainer = "Users"
>strLDAP = "LDAP://CN=" & strContainer & "," & strDomainName
>Set objContainer = GetObject(strLDAP)
>Set objUser = objContainer.Create("User", "CN=" & strLastName &
>strFirstName)
>With objUser
>
> .Put "mailnickname", LEft(strAlias, 20)
> .AccountDisabled = False
> .SetPassword strPassword
> .Put "displayName", strLastName & ", " & strFirstName
> .Put "mail", strEmailAddress
> .Put "userPrincipalName", strAlias & strUPNSuffix
> .Put "sn", strLastName
> .Put "givenName", strFirstName
> .Put "sAMAccountName", Left(strAlias, 20)
> .Put "msExchHideFromAddressLists", FALSE
>End With
>.SetInfo
>
>(watch the line wraps)
>
><Siegfried />
>
>> -----Original Message-----
>> From: himanshu kumar [mailto:hikumar52@w...]
>> Sent: Wednesday, May 08, 2002 5:54 PM
>> To: ASP CDO
>> Subject: [asp_cdo] Unhide a user from Exchange Address list using ASP
>>
>> Hi all,
>>
>>
>> I need one help regarding exchange server 2000.
>>
>> How can i hide and unhide a user from Exhange Address list using ASP.
>I
>>
>> have tried in VBP which is working fine but when i made the dll of
>that
>>
>> vbp and accessing it from ASP dll is giving
>>
>> "Multiple-step OLE DB operation generated errors. Check each OLE DB
>>
>> status value, if available. No work was done. "
>>
>> When i have tried in ASP code Using CDOExm.ImailRecipient and
>>
>> CDO.Person it is giving undefined error.
>>
>> Please help me to hide or unhide a user from Exchange Address list
>from
>>
>> ASP.
>>
>> Thanks
>> Himanshu Kumar
>> Software Engineer
>> Applabs India
>
------------------------------------------------------------
WWW.COM - Where the Web Begins! http://www.www.com
---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------
Message #4 by "Siegfried Weber" <sweber@c...> on Fri, 10 May 2002 11:32:24 +0200
|
|
To make it work with a hidden account from code it depends on how your
code looks like but I am not aware of any problems if you use XML &
WebDAV, ADO or CDOEX against Exchange 2000 because the do just use the
Windows account information.
I also tried to login with a hidden account to OWA 2000 on a test
machine here and it works like a champ, so I am afraid I can't help in
your case.
<Siegfried />
> -----Original Message-----
> From: himanshu kumar [mailto:hikumar52@w...]
> Sent: Friday, May 10, 2002 8:55 AM
> To: ASP CDO
> Subject: [asp_cdo] RE: Unhide a user from Exchange Address list using
ASP
>
>
> Hi Siegfried Weber,
>
> Thanks for your mail regarding this soln. I need one more help from
you.
> We have made a Web site to excess the mail of exchange server. When we
are
> hiding the user from Exchange address list we are not able to login to
the
> site. Using this code we are able to login into the exchange server.
But
> when we are checking the Hide exchange from Address list option in
User
> property -Exchange advance window from Active directory interface it
got
> unchecked.
>
> But if u go throuh exchange server mail site (OWA), if that hide from
> Exchange address list is unchecked, user is able to login to the site
and
> can see the mail.
>
> In our site first we are making the hide from Exchange address list as
> unhide in ASP and then giving the code for login, Which is not good
> aproach.
>
> Can i login without unhide the exchange address list in my site.
>
> Please help me in this also
>
> I will be thankful to u.
>
> Thanks
> Himanshu Kumar
> Software Engineer
> Applabs India
>
>
>
> > [asp_cdo] RE: Unhide a user from Exchange Address list using
ASPDate:
> Fri, 10 May 2002 00:11:14 +0200
> > "Siegfried Weber" <sweber@c...> "ASP CDO"
> <asp_cdo@p...>Reply-To: "ASP CDO" <asp_cdo@p...>
> >
> >You simply need to set the hidden flag of the object with ADSI for
> >example like this (this sample creates a mail enabled user):
> >
> >Set objRootDSE =3D GetObject("LDAP://RootDSE")
> >strDomainName =3D objRootDSE.Get("defaultNamingContext")
> >strContainer =3D "Users"
> >strLDAP =3D "LDAP://CN=3D" & strContainer & "," & strDomainName
> >Set objContainer =3D GetObject(strLDAP)
> >Set objUser =3D objContainer.Create("User", "CN=3D" & strLastName &
> >strFirstName)
> >With objUser
> >
> > .Put "mailnickname", LEft(strAlias, 20)
> > .AccountDisabled =3D False
> > .SetPassword strPassword
> > .Put "displayName", strLastName & ", " & strFirstName
> > .Put "mail", strEmailAddress
> > .Put "userPrincipalName", strAlias & strUPNSuffix
> > .Put "sn", strLastName
> > .Put "givenName", strFirstName
> > .Put "sAMAccountName", Left(strAlias, 20)
> > .Put "msExchHideFromAddressLists", FALSE
> >End With
> >.SetInfo
> >
> >(watch the line wraps)
> >
> ><Siegfried />
> >
> >> -----Original Message-----
> >> From: himanshu kumar [mailto:hikumar52@w...]
> >> Sent: Wednesday, May 08, 2002 5:54 PM
> >> To: ASP CDO
> >> Subject: [asp_cdo] Unhide a user from Exchange Address list using
ASP
> >>
> >> Hi all,
> >>
> >>
> >> I need one help regarding exchange server 2000.
> >>
> >> How can i hide and unhide a user from Exhange Address list using
ASP.
> >I
> >>
> >> have tried in VBP which is working fine but when i made the dll of
> >that
> >>
> >> vbp and accessing it from ASP dll is giving
> >>
> >> "Multiple-step OLE DB operation generated errors. Check each OLE DB
> >>
> >> status value, if available. No work was done. "
> >>
> >> When i have tried in ASP code Using CDOExm.ImailRecipient and
> >>
> >> CDO.Person it is giving undefined error.
> >>
> >> Please help me to hide or unhide a user from Exchange Address list
> >from
> >>
> >> ASP.
> >>
> >> Thanks
> >> Himanshu Kumar
> >> Software Engineer
> >> Applabs India
> >
>
>
>
>
> ------------------------------------------------------------
> WWW.COM - Where the Web Begins! http://www.www.com
>
>
> ---------------------------------------------------------------------
> Express yourself with a super cool email address from BigMailBox.com.
> Hundreds of choices. It's free!
> http://www.bigmailbox.com
> ---------------------------------------------------------------------
>
Message #5 by "himanshu kumar" <hikumar52@w...> on Fri, 10 May 2002 21:49:26 -0700
|
|
Hi Siegfried Weber,
Thanks for your response. I will look in this matter more and if not able to solve then send u my code to you which we are using
here.
One more doubts is there, how we can search or list the User's address contact in exchange server using ASP or VB. We did to list
the contact address from outlook express and outlook 2000 but not did from exchange server directly. Is there any approach to access
the address list of a exchange server user in ASP or VB. can we use CDO or ADSI for this.
Please give me suggestion on this. Thanks a lot for helping me in all the problem.
Thanks
Himanshu Kumar
Software Engineer
Applabs India
> [asp_cdo] RE: Unhide a user from Exchange Address list using ASPDate: Fri, 10 May 2002 11:32:24 +0200
> "Siegfried Weber" <sweber@c...> "ASP CDO" <asp_cdo@p...>Reply-To: "ASP CDO"
<asp_cdo@p...>
>
>To make it work with a hidden account from code it depends on how your
>code looks like but I am not aware of any problems if you use XML &
>WebDAV, ADO or CDOEX against Exchange 2000 because the do just use the
>Windows account information.
>
>I also tried to login with a hidden account to OWA 2000 on a test
>machine here and it works like a champ, so I am afraid I can't help in
>your case.
>
><Siegfried />
>
>> -----Original Message-----
>> From: himanshu kumar [mailto:hikumar52@w...]
>> Sent: Friday, May 10, 2002 8:55 AM
>> To: ASP CDO
>> Subject: [asp_cdo] RE: Unhide a user from Exchange Address list using
>ASP
>>
>>
>> Hi Siegfried Weber,
>>
>> Thanks for your mail regarding this soln. I need one more help from
>you.
>> We have made a Web site to excess the mail of exchange server. When we
>are
>> hiding the user from Exchange address list we are not able to login to
>the
>> site. Using this code we are able to login into the exchange server.
>But
>> when we are checking the Hide exchange from Address list option in
>User
>> property -Exchange advance window from Active directory interface it
>got
>> unchecked.
>>
>> But if u go throuh exchange server mail site (OWA), if that hide from
>> Exchange address list is unchecked, user is able to login to the site
>and
>> can see the mail.
>>
>> In our site first we are making the hide from Exchange address list as
>> unhide in ASP and then giving the code for login, Which is not good
>> aproach.
>>
>> Can i login without unhide the exchange address list in my site.
>>
>> Please help me in this also
>>
>> I will be thankful to u.
>>
>> Thanks
>> Himanshu Kumar
>> Software Engineer
>> Applabs India
>>
>>
>>
>> > [asp_cdo] RE: Unhide a user from Exchange Address list using
>ASPDate:
>> Fri, 10 May 2002 00:11:14 +0200
>> > "Siegfried Weber" <sweber@c...> "ASP CDO"
>> <asp_cdo@p...>Reply-To: "ASP CDO" <asp_cdo@p...>
>> >
>> >You simply need to set the hidden flag of the object with ADSI for
>> >example like this (this sample creates a mail enabled user):
>> >
>> >Set objRootDSE = GetObject("LDAP://RootDSE")
>> >strDomainName = objRootDSE.Get("defaultNamingContext")
>> >strContainer = "Users"
>> >strLDAP = "LDAP://CN=" & strContainer & "," & strDomainName
>> >Set objContainer = GetObject(strLDAP)
>> >Set objUser = objContainer.Create("User", "CN=" & strLastName &
>> >strFirstName)
>> >With objUser
>> >
>> > .Put "mailnickname", LEft(strAlias, 20)
>> > .AccountDisabled = False
>> > .SetPassword strPassword
>> > .Put "displayName", strLastName & ", " & strFirstName
>> > .Put "mail", strEmailAddress
>> > .Put "userPrincipalName", strAlias & strUPNSuffix
>> > .Put "sn", strLastName
>> > .Put "givenName", strFirstName
>> > .Put "sAMAccountName", Left(strAlias, 20)
>> > .Put "msExchHideFromAddressLists", FALSE
>> >End With
>> >.SetInfo
>> >
>> >(watch the line wraps)
>> >
>> ><Siegfried />
>> >
>> >> -----Original Message-----
>> >> From: himanshu kumar [mailto:hikumar52@w...]
>> >> Sent: Wednesday, May 08, 2002 5:54 PM
>> >> To: ASP CDO
>> >> Subject: [asp_cdo] Unhide a user from Exchange Address list using
>ASP
>> >>
>> >> Hi all,
>> >>
>> >>
>> >> I need one help regarding exchange server 2000.
>> >>
>> >> How can i hide and unhide a user from Exhange Address list using
>ASP.
>> >I
>> >>
>> >> have tried in VBP which is working fine but when i made the dll of
>> >that
>> >>
>> >> vbp and accessing it from ASP dll is giving
>> >>
>> >> "Multiple-step OLE DB operation generated errors. Check each OLE DB
>> >>
>> >> status value, if available. No work was done. "
>> >>
>> >> When i have tried in ASP code Using CDOExm.ImailRecipient and
>> >>
>> >> CDO.Person it is giving undefined error.
>> >>
>> >> Please help me to hide or unhide a user from Exchange Address list
>> >from
>> >>
>> >> ASP.
>> >>
>> >> Thanks
>> >> Himanshu Kumar
>> >> Software Engineer
>> >> Applabs India
>> >
>>
>>
>>
>>
>> ------------------------------------------------------------
>> WWW.COM - Where the Web Begins! http://www.www.com
>>
>>
>> ---------------------------------------------------------------------
>> Express yourself with a super cool email address from BigMailBox.com.
>> Hundreds of choices. It's free!
>> http://www.bigmailbox.com
>> ---------------------------------------------------------------------
>>
>
------------------------------------------------------------
WWW.COM - Where the Web Begins! http://www.www.com
---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------
Message #6 by "Siegfried Weber" <sweber@c...> on Mon, 13 May 2002 09:58:51 +0200
|
|
Assuming you are still talking about Exchange 2000 and Windows 2000 you
can either use ADSI (preferred) or CDO 1.21 to search for an user (or
whatever you like). Although CDO 1.21 still works it has a bunch of
limitations hence I'd recommend using ADSI.
<Siegfried />
> -----Original Message-----
> From: himanshu kumar [mailto:hikumar52@w...]
> Sent: Saturday, May 11, 2002 6:49 AM
> To: ASP CDO
> Subject: [asp_cdo] RE: Unhide a user from Exchange Address list using
ASP
>
> Hi Siegfried Weber,
>
> Thanks for your response. I will look in this matter more and if
not
> able to solve then send u my code to you which we are using here.
>
> One more doubts is there, how we can search or list the User's address
> contact in exchange server using ASP or VB. We did to list the contact
> address from outlook express and outlook 2000 but not did from
exchange
> server directly. Is there any approach to access the address list of a
> exchange server user in ASP or VB. can we use CDO or ADSI for this.
>
> Please give me suggestion on this. Thanks a lot for helping me in all
the
> problem.
>
> Thanks
> Himanshu Kumar
> Software Engineer
> Applabs India
>
>
>
> > [asp_cdo] RE: Unhide a user from Exchange Address list using
ASPDate:
> Fri, 10 May 2002 11:32:24 +0200
> > "Siegfried Weber" <sweber@c...> "ASP CDO"
> <asp_cdo@p...>Reply-To: "ASP CDO" <asp_cdo@p...>
> >
> >To make it work with a hidden account from code it depends on how
your
> >code looks like but I am not aware of any problems if you use XML &
> >WebDAV, ADO or CDOEX against Exchange 2000 because the do just use
the
> >Windows account information.
> >
> >I also tried to login with a hidden account to OWA 2000 on a test
> >machine here and it works like a champ, so I am afraid I can't help
in
> >your case.
> >
> ><Siegfried />
> >
> >> -----Original Message-----
> >> From: himanshu kumar [mailto:hikumar52@w...]
> >> Sent: Friday, May 10, 2002 8:55 AM
> >> To: ASP CDO
> >> Subject: [asp_cdo] RE: Unhide a user from Exchange Address list
using
> >ASP
> >>
> >>
> >> Hi Siegfried Weber,
> >>
> >> Thanks for your mail regarding this soln. I need one more help from
> >you.
> >> We have made a Web site to excess the mail of exchange server. When
we
> >are
> >> hiding the user from Exchange address list we are not able to login
to
> >the
> >> site. Using this code we are able to login into the exchange
server.
> >But
> >> when we are checking the Hide exchange from Address list option in
> >User
> >> property -Exchange advance window from Active directory interface
it
> >got
> >> unchecked.
> >>
> >> But if u go throuh exchange server mail site (OWA), if that hide
from
> >> Exchange address list is unchecked, user is able to login to the
site
> >and
> >> can see the mail.
> >>
> >> In our site first we are making the hide from Exchange address list
as
> >> unhide in ASP and then giving the code for login, Which is not good
> >> aproach.
> >>
> >> Can i login without unhide the exchange address list in my site.
> >>
> >> Please help me in this also
> >>
> >> I will be thankful to u.
> >>
> >> Thanks
> >> Himanshu Kumar
> >> Software Engineer
> >> Applabs India
> >>
> >>
> >>
> >> > [asp_cdo] RE: Unhide a user from Exchange Address list using
> >ASPDate:
> >> Fri, 10 May 2002 00:11:14 +0200
> >> > "Siegfried Weber" <sweber@c...> "ASP CDO"
> >> <asp_cdo@p...>Reply-To: "ASP CDO" <asp_cdo@p...>
> >> >
> >> >You simply need to set the hidden flag of the object with ADSI for
> >> >example like this (this sample creates a mail enabled user):
> >> >
> >> >Set objRootDSE =3D GetObject("LDAP://RootDSE")
> >> >strDomainName =3D objRootDSE.Get("defaultNamingContext")
> >> >strContainer =3D "Users"
> >> >strLDAP =3D "LDAP://CN=3D" & strContainer & "," & strDomainName
> >> >Set objContainer =3D GetObject(strLDAP)
> >> >Set objUser =3D objContainer.Create("User", "CN=3D" & strLastName
&
> >> >strFirstName)
> >> >With objUser
> >> >
> >> > .Put "mailnickname", LEft(strAlias, 20)
> >> > .AccountDisabled =3D False
> >> > .SetPassword strPassword
> >> > .Put "displayName", strLastName & ", " & strFirstName
> >> > .Put "mail", strEmailAddress
> >> > .Put "userPrincipalName", strAlias & strUPNSuffix
> >> > .Put "sn", strLastName
> >> > .Put "givenName", strFirstName
> >> > .Put "sAMAccountName", Left(strAlias, 20)
> >> > .Put "msExchHideFromAddressLists", FALSE
> >> >End With
> >> >.SetInfo
> >> >
> >> >(watch the line wraps)
> >> >
> >> ><Siegfried />
> >> >
> >> >> -----Original Message-----
> >> >> From: himanshu kumar [mailto:hikumar52@w...]
> >> >> Sent: Wednesday, May 08, 2002 5:54 PM
> >> >> To: ASP CDO
> >> >> Subject: [asp_cdo] Unhide a user from Exchange Address list
using
> >ASP
> >> >>
> >> >> Hi all,
> >> >>
> >> >>
> >> >> I need one help regarding exchange server 2000.
> >> >>
> >> >> How can i hide and unhide a user from Exhange Address list using
> >ASP.
> >> >I
> >> >>
> >> >> have tried in VBP which is working fine but when i made the dll
of
> >> >that
> >> >>
> >> >> vbp and accessing it from ASP dll is giving
> >> >>
> >> >> "Multiple-step OLE DB operation generated errors. Check each OLE
DB
> >> >>
> >> >> status value, if available. No work was done. "
> >> >>
> >> >> When i have tried in ASP code Using CDOExm.ImailRecipient and
> >> >>
> >> >> CDO.Person it is giving undefined error.
> >> >>
> >> >> Please help me to hide or unhide a user from Exchange Address
list
> >> >from
> >> >>
> >> >> ASP.
> >> >>
> >> >> Thanks
> >> >> Himanshu Kumar
> >> >> Software Engineer
> >> >> Applabs India
> >> >
> >>
> >>
> >>
> >>
> >> ------------------------------------------------------------
> >> WWW.COM - Where the Web Begins! http://www.www.com
> >>
> >>
> >>
---------------------------------------------------------------------
> >> Express yourself with a super cool email address from
BigMailBox.com.
> >> Hundreds of choices. It's free!
> >> http://www.bigmailbox.com
> >>
---------------------------------------------------------------------
> >>
> >
>
>
>
>
> ------------------------------------------------------------
> WWW.COM - Where the Web Begins! http://www.www.com
>
>
> ---------------------------------------------------------------------
> Express yourself with a super cool email address from BigMailBox.com.
> Hundreds of choices. It's free!
> http://www.bigmailbox.com
> ---------------------------------------------------------------------
>
|
|
 |