473,231 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Invalid handle error with XMLHTTP

Hi all

I am trying to execute a WebDAV query against a webmail Exchange inbox using
XMLHttp but I keep getting an error stating "The handle is invalid" when I
call the send() method.

My code is as follows:

MSXML2.ServerXMLHTTP40Class xmlHttp = new ServerXMLHTTP40Class();
string folderQuery = "<?xml version=\"1.0\"?>" + "<g:searchrequest
xmlns:g=\"DAV:\">" + "<g:sql>SELECT TOP 1 \"urn:schemas:httpmail:subject\", "
+ "\"urn:schemas:httpmail:from\", \"DAV:displayname\", " +
"\"urn:schemas:httpmail:textdescription\" " + "FROM SCOPE('shallow traversal
of \"" + serverUrl + "\"') " + "WHERE \"DAV:ishidden\" = False AND
\"DAV:isfolder\" = False " +
"AND \"urn:schemas:httpmail:subject\" LIKE '%" + "Undeliverable" + "%' " +
"ORDER BY \"urn:schemas:httpmail:date\" DESC" + "</g:sql></g:searchrequest>";

// Open a connection to the exchange server.
xmlHttp.open("PROPFIND", serverUrl, false, userName, password);
// Send the request.
xmlHttp.setRequestHeader("SQL", folderQuery);
xmlHttp.setRequestHeader("Content-type", "text/xml");
xmlHttp.setRequestHeader("Depth", "1");

I've tried browsing to the URL in IE and I can access the inbox with the
username and password.

Can anyone help me with this, please?

Thanks as always

Jul 21 '05 #1
0 1101

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Krzysztof Kubiak | last post by:
I'm trying to make use of XMLHTTP object, but I've come across a problem. It seems that there is no way to create dynamic array of such XMLHTTP objects (to make several requests) and handle them...
by: RK | last post by:
I am getting the "HTTP /1.1 405 - method not allowed" error when I am sending XML string over Msxml2.XMLHTTP object. I am sending data in POST, also passing querystring variable and here is the...
by: nek | last post by:
Would anyone have any ideas or come across the 'invalid handle' problem? Even after setting diaglevel=4, I could not get much out of the db2diag.log to diagnose the problem. The only thing I...
by: Shivonne | last post by:
Hi all I am trying to execute a WebDAV query against a webmail Exchange inbox using XMLHttp but I keep getting an error stating "The handle is invalid" when I call the send() method. My code...
by: tydbowl | last post by:
I have a problem where the below code chunk causes handle leaks on some machines. The leak APPEARS to be handles to the registry key: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet...
by: sonu | last post by:
i used the following code at client side: function btn_send.onclick() { // create ADO-stream Object var ado_stream = new ActiveXObject("ADODB.Stream"); // create XML document with default...
by: mirandacascade | last post by:
O/S : Win2K vsn of Python: 2.4 Hoping to find information that provide information about error messages being encountered. Pythonwin session: Traceback (most recent call last): File...
by: omerbutt | last post by:
hi there i am getting error in the statechange function .I am using html,ajax,php and mysql,it was running smooth and at once it started giving error here is the code function prof_info(fobj){...
by: vikas251074 | last post by:
I am getting error while entry in userid field. When user enter his user id, an event is fired immediately and user id is verified using AJAX method. But I am getting error 'Object doesn't support...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.