Link to home
Start Free TrialLog in
Avatar of rbnzuser
rbnzuser

asked on

PROPFIND - The remote server returned an error: (501) Not Implemented. Exchange Server 2003

Using WebDAV for exchange 2003. Requesting security descriptor from a public folder, get the error returned:
The remote server returned an error: (501) Not Implemented.

This returns an xml document when I run the same query on a private folder in my personal Inbox.
Any clues appreciated.

Already checked that the url is encoded, and browsing through http://exch1/public works fine.
Avatar of Stacy Spear
Stacy Spear
Flag of United States of America image

Can you show the code you are using (relevant parts)
Avatar of rbnzuser
rbnzuser

ASKER

           HttpWebRequest Request;
            WebResponse Response;

            strFolderURI = "http://exch1/exchange/PFAdminTest/Inbox/";
            //strFolderURI = "http://exch1/public/Test%20Fileplan/Another";

            try
            {
                string strQuery = "<?xml version='1.0' ?>"
                   + "<f:propfind xmlns:f='DAV:'>"
                   + "<f:prop xmlns:m='http://schemas.microsoft.com/exchange/security/'>"
                   + "<m:descriptor/>"
                   + "</f:prop>"
                   + "</f:propfind>";

                // Create the HttpWebRequest object.
                Request = (HttpWebRequest)HttpWebRequest.Create(strFolderURI);

                // Add the network mCredentials to the request.
                Request.Credentials = mCredentials;
                Request.PreAuthenticate = true;

                // Specify the method.
                Request.Method = "PROPFIND";

                // Encode the body using UTF-8.
                byte[] bytes = Encoding.UTF8.GetBytes(strQuery);

                // Set the content header length.  This must be
                // done before writing data to the request stream.
                //request.ContentLength = bytes.Length;

                // Get a reference to the request stream.
                Stream RequestStream = Request.GetRequestStream();

                // Write the SQL query to the request stream.
                RequestStream.Write(bytes, 0, bytes.Length);
               
                // Close the Stream object to release the connection
                // for further use.
                RequestStream.Close();

                // Set the content type header.
                Request.ContentType = CONTENT_TYPE_XML;

                Response = (HttpWebResponse)Request.GetResponse();

                Stream ResponseStream = Response.GetResponseStream();
Used BPROPFIND instead. This seems to work fine.
wow, wonder why it didn't work the first time. was working up more code to test this out.

Request to close this one.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please check the firewall
This is a closed question abal.