473,320 Members | 1,713 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,320 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");
xmlHttp.send(null);

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

Shivonne
Jul 21 '05 #1
0 1102

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

Similar topics

6
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...
5
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...
0
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...
0
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...
39
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...
0
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...
4
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...
6
omerbutt
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){...
21
vikas251074
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.