Chuck,

If you add the following to your query [and then write it to the screen] you
should get what you are looking for...
mail,legacyExchangeDN

r/Bill
                -----Original Message-----
                From:   Chuck [mailto:[EMAIL PROTECTED]]
                Sent:   Wednesday, January 22, 2003 8:00 PM
                To:     [EMAIL PROTECTED]
                Subject:        [ActiveDir] Users Exchange Server

                  Hello,
                I'm having a small problem, I've tried everything and can't
figure this
                out. I'm using the basic strings and functions to get a
users details
                and it works great on my home IIS running Win2K Server. I
took the code
                and copied and pasted it and it worked on the business
network for a few
                days, now it will show everything except the Exchange server
and the
                postal address.
                 
                The IIS is running on an NT4 server and the network consists
of several
                W2k domain controllers, we are on a native mode Active
Directory.
                It's not the network, I have used the ADSI SDK and it works
showing
                everything fine, I've made a VB application that works fine.
                 
                I have tried running it on a W2K workstation with IIS and
same thing, no
                exchange server.
                Has anyone else encontered this, or have any ideas?
                 
                Here's a small snipet of the code I'm using to query AD, any
help or
                ideas would be greatly appreciated.
                 
                <%
                strUCN = "USerID"
                oConnection.Provider = "ADSDSOObject"
                oConnection.Open "ADProvider", sUser, sPassword
                  strADOQuery = "<LDAP://"; + strNC +
        
">;(&(objectCategory=person)(objectClass=user)(samAccountName=" + & _
                        strUCN +  "));cn,adspath;subtree"
                 
                Response.Write(oUser.msExchHomeServerName)
                %>
                 
                Regards,
                Chuck
                 
                List info   : http://www.activedir.org/mail_list.htm
                List FAQ    : http://www.activedir.org/list_faq.htm
                List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to