473,396 Members | 2,068 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,396 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
Nov 22 '05 #1
0 773

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...
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...
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...
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...
8
by: ananjy | last post by:
Hi when i m trying to execute my ajax code using a link to display datas from another page named second.php., i got an error when the page loads in "ie"., which runs perfectly in firefox., here...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.