none
[X-POST] WebDav Exchange 2003 The remote server returned an error: (400) Bad Request RRS feed

  • Question

  • Hi everybody,

    I receiving a bad request error when I try to get the contacts from a Exchange Server 2003.

    It seems that my query is wrong. Can anybody help me with the query?

    Where the search textbox contains the url to the public contacts: https://myserver/public/Contatos/Contatos

     

    string sRequest = string.Format(
                        @"<?xml version=""1.0""?>
                    <g:searchrequest xmlns:g=""DAV:"">
                        <g:sql>
                            SELECT
                                ""urn:schemas:contacts:sn"", ""urn:schemas:contacts:givenName"",
                                ""urn:schemas:contacts:email1"", ""urn:schemas:contacts:telephoneNumber"", 
                                ""urn:schemas:contacts:bday"", ""urn:schemas:contacts:nickname"",
                                ""urn:schemas:contacts:o"", ""    urn:schemas:contacts:profession""
                            FROM
                                Scope('SHALLOW TRAVERSAL OF ""{0}""')
                            WHERE
                                ""urn:schemas:contacts:givenName"" LIKE '{1}%'
                            OR
                                ""urn:schemas:contacts:sn"" LIKE '{1}%'
                        </g:sql>
                    </g:searchrequest>",
                        txtSearch.Text, keyword);
    


    Tuesday, November 8, 2011 12:20 PM