Hi @all I get all my items from my address lists with LDAP and SearchQuery. So I can display name, mail and nickname. But how can I get the other user information like phone, company,... . I need all informations like in a contact item(OWA). I have tried to get this informations with WebDAV. But I havn't not enought access(-> error 401). How can I get this informations or which access I need on exchange for using WebDAV for this work? Every idea will help! thx
I think that problem in your case is inappropriate authentication type. What type of authentication is enabled on your server? Michael ------------------------------- If you need WebDAV API for Exchange server, use our component WebDAV .NET for Exchange. Check out http://www.independentsoft.com "Rahel Richter" wrote in message news:ADA7947C-E674-44B6-A85F-8AAEB14CDEDE@microsoft.com... > Hi @all > > I get all my items from my address lists with LDAP and SearchQuery. So I can > display name, mail and nickname. But how can I get the other user information > like phone, company,... . I need all informations like in a contact > item(OWA). I have tried to get this informations with WebDAV. But I havn't > not enought access(-> error 401). > > How can I get this informations or which access I need on exchange for using > WebDAV for this work? > > Every idea will help! > thx
Hi, thx for your help. I have read access for public folders and all rights for 'my' folders(Inbox,...). With LDAP I can get all infos from GAL, now. But it's veeeery slowly. So I have to connect with WebDAV nevertheless. 'cause it's a web-base application, it is possible that I connect not with my xp access to Exchange if I use WebDAV? Rahel
Yes, you can use your Windows XP account with WebDAV. It is Windows Integrated Authentication. Michael ------------------------------- If you need WebDAV API for Exchange server, use our component WebDAV .NET for Exchange. Check out http://www.independentsoft.com "Rahel Richter" wrote in message news:8F511A7C-AA8B-47BD-93DD-C0D46716C95E@microsoft.com... > Hi, > > thx for your help. > > I have read access for public folders and all rights for 'my' > folders(Inbox,...). > > With LDAP I can get all infos from GAL, now. But it's veeeery slowly. > > So I have to connect with WebDAV nevertheless. > > 'cause it's a web-base application, it is possible that I connect not with > my xp access to Exchange if I use WebDAV? > > Rahel
I use windowsauthentication for connecting Active Directory -> <identity impersonate="true" /> I can connect AD and I can get read all user information on Exchange Server with LDAP Why get I an error 401 if I use WebDAV. I cannot understand, why. I think, if I have read access I must can searching in folders on Exchange. What is the different between LDAP and WebDAV relative of connecting folders on Exchange? thx for help Rahel
How does look like your WebDAV code? Post here. Michael ------------------------------- If you need WebDAV API for Exchange server, use our component WebDAV .NET for Exchange. Check out http://www.independentsoft.com "Rahel Richter" wrote in message news:1C47F94F-1A7E-4C43-9241-7CF69E17664B@microsoft.com... > I use windowsauthentication for connecting Active Directory > -> <identity impersonate="true" /> > > > I can connect AD > and > I can get read all user information on Exchange Server > with LDAP > > Why get I an error 401 if I use WebDAV. > I cannot understand, why. > I think, if I have read access I must can searching in folders on Exchange. > What is the different between LDAP and WebDAV relative of connecting > folders on Exchange? > > thx for help > Rahel
This is a code part from web for a api apps. private void test6() { System.Net.HttpWebRequest Request; System.Net.WebResponse Response; System.Net.CredentialCache MyCredentialCache; string strRootURI = "http://<EXCHANGESERVER>/public/"; string strUserName = "<USERNAME>"; string strPassword = "<USERPASSWORD>"; string strDomain = "<DOMAIN>"; string strQuery =""; byte[] bytes = null; System.IO.Stream RequestStream = null; System.IO.Stream ResponseStream = null; XmlDocument ResponseXmlDoc = null; XmlNodeList DisplayNameNodes = null; try { strQuery="<?xml version='1.0'?><g:searchrequest xmlns:g='DAV:'>" + "<g:sql>SELECT \"DAV:displayname\" FROM SCOPE('SHALLOW TRAVERSAL OF \"http://<EXCHANGESERVER>/public/" + "\"') WHERE \"DAV:isfolder\"=true " + "</g:sql></g:searchrequest>"; MyCredentialCache = new System.Net.CredentialCache(); MyCredentialCache.Add( new System.Uri(strRootURI),"NTLM", new System.Net.NetworkCredential(strUserName, strPassword, strDomain)); Request = (System.Net.HttpWebRequest)HttpWebRequest.Create(strRootURI); Request.Credentials = MyCredentialCache; Request.Method = "SEARCH"; bytes = Encoding.UTF8.GetBytes((string)strQuery); Request.ContentLength = bytes.Length; RequestStream = Request.GetRequestStream(); RequestStream.Write(bytes, 0, bytes.Length); RequestStream.Close(); Request.ContentType = "text/xml"; Response = (HttpWebResponse)Request.GetResponse(); ResponseStream = Response.GetResponseStream(); ResponseXmlDoc = new XmlDocument(); ResponseXmlDoc.Load(ResponseStream); DisplayNameNodes = ResponseXmlDoc.GetElementsByTagName("a:displayname"); if(DisplayNameNodes.Count > 0) { Console.WriteLine("Non-folder item display names..."); for(int i=0; i<DisplayNameNodes.Count; i++) { Console.WriteLine (DisplayNameNodes[i].InnerText); } } else { Console.WriteLine("No non-folder items found..."); } ResponseStream.Close(); Response.Close(); } catch(Exception ex) { Console.WriteLine(ex.Message); } thx for your time! Rahel
Your code looks good. Does server has enabled "Windows Integrated Authentication"? Michael ------------------------------- If you need WebDAV API for Exchange server, use our component WebDAV .NET for Exchange. Check out http://www.independentsoft.com "Rahel Richter" wrote in message news:5468BFED-D977-4CD8-B4AE-62675DE6D6D9@microsoft.com... > This is a code part from web for a api apps. > > private void test6() > { > System.Net.HttpWebRequest Request; > System.Net.WebResponse Response; > System.Net.CredentialCache MyCredentialCache; > string strRootURI = "http://<EXCHANGESERVER>/public/"; > string strUserName = "<USERNAME>"; > string strPassword = "<USERPASSWORD>"; > string strDomain = "<DOMAIN>"; > string strQuery =""; > byte[] bytes = null; > System.IO.Stream RequestStream = null; > System.IO.Stream ResponseStream = null; > XmlDocument ResponseXmlDoc = null; > XmlNodeList DisplayNameNodes = null; > > try > { > strQuery="<?xml version='1.0'?><g:searchrequest xmlns:g='DAV:'>" > + "<g:sql>SELECT \"DAV:displayname\" FROM SCOPE('SHALLOW TRAVERSAL OF > \"http://<EXCHANGESERVER>/public/" > + "\"') WHERE \"DAV:isfolder\"=true " > + "</g:sql></g:searchrequest>"; > > MyCredentialCache = new System.Net.CredentialCache(); > MyCredentialCache.Add( new System.Uri(strRootURI),"NTLM", > new System.Net.NetworkCredential(strUserName, strPassword, strDomain)); > > Request = (System.Net.HttpWebRequest)HttpWebRequest.Create(strRootURI); > Request.Credentials = MyCredentialCache; > Request.Method = "SEARCH"; > bytes = Encoding.UTF8.GetBytes((string)strQuery); > Request.ContentLength = bytes.Length; > RequestStream = Request.GetRequestStream(); > RequestStream.Write(bytes, 0, bytes.Length); > RequestStream.Close(); > Request.ContentType = "text/xml"; > Response = (HttpWebResponse)Request.GetResponse(); > ResponseStream = Response.GetResponseStream(); > ResponseXmlDoc = new XmlDocument(); > ResponseXmlDoc.Load(ResponseStream); > DisplayNameNodes = ResponseXmlDoc.GetElementsByTagName("a:displayname"); > > if(DisplayNameNodes.Count > 0) > { > Console.WriteLine("Non-folder item display names..."); > > for(int i=0; i<DisplayNameNodes.Count; i++) > { > Console.WriteLine (DisplayNameNodes[i].InnerText); > } > } > else > { > Console.WriteLine("No non-folder items found..."); > } > ResponseStream.Close(); > Response.Close(); > } > catch(Exception ex) > { > Console.WriteLine(ex.Message); > } > > thx for your time! > > Rahel
Yes, I can connect with 'Windows Integrated Authentication' by LDAP. Therefore I do not understand it also. It MUST work. further ideas? "Michael" wrote: > Your code looks good. > Does server has enabled "Windows Integrated Authentication"? > > Michael > ------------------------------- > If you need WebDAV API for Exchange server, > use our component WebDAV .NET for Exchange. > Check out http://www.independentsoft.com > > > "Rahel Richter" wrote in message news:5468BFED-D977-4CD8-B4AE-62675DE6D6D9@microsoft.com... > > This is a code part from web for a api apps. > > > > private void test6() > > { > > System.Net.HttpWebRequest Request; > > System.Net.WebResponse Response; > > System.Net.CredentialCache MyCredentialCache; > > string strRootURI = "http://<EXCHANGESERVER>/public/"; > > string strUserName = "<USERNAME>"; > > string strPassword = "<USERPASSWORD>"; > > string strDomain = "<DOMAIN>"; > > string strQuery =""; > > byte[] bytes = null; > > System.IO.Stream RequestStream = null; > > System.IO.Stream ResponseStream = null; > > XmlDocument ResponseXmlDoc = null; > > XmlNodeList DisplayNameNodes = null; > > > > try > > { > > strQuery="<?xml version='1.0'?><g:searchrequest xmlns:g='DAV:'>" > > + "<g:sql>SELECT \"DAV:displayname\" FROM SCOPE('SHALLOW TRAVERSAL OF > > \"http://<EXCHANGESERVER>/public/" > > + "\"') WHERE \"DAV:isfolder\"=true " > > + "</g:sql></g:searchrequest>"; > > > > MyCredentialCache = new System.Net.CredentialCache(); > > MyCredentialCache.Add( new System.Uri(strRootURI),"NTLM", > > new System.Net.NetworkCredential(strUserName, strPassword, strDomain)); > > > > Request = (System.Net.HttpWebRequest)HttpWebRequest.Create(strRootURI); > > Request.Credentials = MyCredentialCache; > > Request.Method = "SEARCH"; > > bytes = Encoding.UTF8.GetBytes((string)strQuery); > > Request.ContentLength = bytes.Length; > > RequestStream = Request.GetRequestStream(); > > RequestStream.Write(bytes, 0, bytes.Length); > > RequestStream.Close(); > > Request.ContentType = "text/xml"; > > Response = (HttpWebResponse)Request.GetResponse(); > > ResponseStream = Response.GetResponseStream(); > > ResponseXmlDoc = new XmlDocument(); > > ResponseXmlDoc.Load(ResponseStream); > > DisplayNameNodes = ResponseXmlDoc.GetElementsByTagName("a:displayname"); > > > > if(DisplayNameNodes.Count > 0) > > { > > Console.WriteLine("Non-folder item display names..."); > > > > for(int i=0; i<DisplayNameNodes.Count; i++) > > { > > Console.WriteLine (DisplayNameNodes[i].InnerText); > > } > > } > > else > > { > > Console.WriteLine("No non-folder items found..."); > > } > > ResponseStream.Close(); > > Response.Close(); > > } > > catch(Exception ex) > > { > > Console.WriteLine(ex.Message); > > } > > > > thx for your time! > > > > Rahel