473,403 Members | 2,284 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,403 software developers and data experts.

Accessing Free/Busy Exchange Data Using ASP

I found the following information on this site, but I am unable to get it to work. All it brings back is the xml page with no data. I am running a Windows 2003 Server with Exchange 2003 Server.

When the code gets to This line..

If objDoc.loadXml(objRequest.ResponseText) Then

The results return False and I don't receive any data. Does anyone know what the problem may be?

Re: ASP: Exchange 2003 Free/Busy Lookup
--------------------------------------------------------------------------------

I have figured this out myself. The problem was with Anonymous access being
disabled within the IIS for the public folder. Once I enabled this I was
able to retrieve an XML file of the specified users free/busy status.

Also the code I was using was for exchange2000 and not 2003, this brought
back a HTML formatted page of the specified users free/busy status. Once I
used the 2003 code this brought back an XML file.

I hope this helps someone else out.


"Andy" wrote:
Quote:
Originally Posted by
Hi,
>
I'm trying to get a users free/busy status from exchange from within a
website and
using the code below, but when I run this a login page from MS Outlook Web
Access is retrieved from the server rather than a XML file containing the
users free/busy status for the specified time period.
>
I've spent all day looking for solutions to this but I'm stumped. I have
been looking for an Exchange newsgroup but there doesn't seam to be one, does
anyone know if i can post this some where else to get a response from an
Exchange expert.
>
The Server is 2003, with Exchange 2003.
>
Any help would be very much appreciated!
>
Code being run is shown below and was modified from the following location:
http://msdn.microsoft.com/library/d...status_http.asp
>
<%
' Initialize variables.
' The public folder server that contains the user's free/busy information.
strServer = "????????????"
>
' The user's e-mail address.
strUser = "andy.long@????????????.co.uk"
>
' Build the URL with the freebusy command. Specify a start date/time of
' 08:00 (UTC) 27 Sep 2004, an end date/time of 20:00 (UTC) 27 Sep 2004, an
' interval of 60 minutes, and the e-mail address of the user. Multiple
' e-mail addresses can be specified by appending one or more
' "&u=SMTP:user@example.com" command parameter values to the URL string.
strUrl="https://" & strServer & "/public/?cmd=freebusy" & _
"&start=2006-10-24T08:00:00Z" & _
"&end=2006-10-24T20:00:00Z" & _
"&interval=60" & _
"&u=SMTP:" & strUser ' & "&u=SMTP:user2@example.com"
>
' Initialize the XMLHTTP object.
set objRequest=createobject("Msxml2.ServerXMLHTTP")
>
' Open the request object with the GET method and
' specify that it will be sent asynchronously.
objRequest.open "GET", strUrl, false
>
' Set the Content-Type header.
objRequest.setRequestHeader "Content-Type", "text/xml"
>
' Set the Content-Length header.
objRequest.setRequestHeader "Content-Length", 0
>
' Set the Accept-language header.
objRequest.setRequestHeader "Accept-Language", "en-us"
>
' Send the GET method request.
objRequest.send
>
' The request was successful.
If 200 = objRequest.status Then
' Uncomment this line to see the XML response.
response.write(objRequest.responsetext)
>
' Create the DOM document.
Set objDoc = createobject("msxml2.domdocument")
>
' Load the XML response body.
If objDoc.loadXml(objRequest.ResponseText) Then
>
' Build a list of the WM:item XML nodes, corresponding to the
' returned user and free/busy information of the freebusy
' command. The WM: namespace is typically assigned the a: prefix
' in the XML response body. The namespaces and their associated
' prefixes are located in the attributes of the WM:response node
' of the XML response.
Set objNodeList=objDoc.selectNodes("//a:item")
>
' Iterate through the WM:item nodes.
For Each objItemNode In objNodeList
>
' Use an XPath query to get the WM:displayname node
' from the WM:item node.
set objDisplayNode = objItemNode.selectSingleNode("a:displayname")
>
' Use an XPath query to get the WM:fbdata node
' from the WM:item node.
set objFBNode = objItemNode.selectSingleNode("a:fbdata")
>
' Display free/busy information.
response.write("Display name: " & objDisplayNode.Text)
response.write("Free/busy data: " & objFBNode.Text)
response.write("<br>")
Next
End If
>
Else
response.write(objRequest.status & " " & objRequest.statustext)
End if
>
' Clean up.
Set objRequest = nothing
Set objDoc = nothing
%>
Feb 18 '07 #1
0 3579

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mick Kehoe | last post by:
Hi All We are running SQL Server & Outlook with an exchange server. We are looking for a way to import the address book & email details into a database table. We have managed to do this with...
0
by: Arun T M | last post by:
I have a Windows Service written in VB .NET which connects to an Exchange Server and accesses the messages in the Public Folders. I am using Collaborative Data Objects to do this. When I run the...
4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
1
by: Jeff | last post by:
Hello, I am using the following C# code to get the freeBusy status of a user. However, the getFreeBusy function is returning null. The code is part of a service I have running on my local machine ...
2
by: Jimmy Reds | last post by:
Hi, I have a blood glucose meter (a Lifescan OneTouch Ultra in case anyone was wondering) which I connect to my PC using a USB cable and I would like to have a go at accessing the data on this...
2
by: lauge | last post by:
Hi, I will like to access the Address book in windows via C# (.net 2.0), is this possible and can it be done independent of the mail program that the end users are using?? Best Flemming
2
by: Andy | last post by:
Hi, I'm trying to get a users free/busy status from exchange from within a website and using the code below, but when I run this a login page from MS Outlook Web Access is retrieved from the...
7
by: simchajoy2000 | last post by:
Hi, I am just a javascript beginner so maybe this is a simple problem but I am trying to do some rollovers on images in a separate <div>. Here is the relevent piece of my code: <html>...
1
by: =?Utf-8?B?VGVycmVuY2U=?= | last post by:
For a past day or two I've been to noticing the following error. Event Type: Warning Event Source: Outlook Event Category: None Event ID: 25 Date: 6/24/2007 Time: 12:05:07 PM User: N/A...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.