473,385 Members | 1,384 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,385 software developers and data experts.

ASP: Exchange 2003 Free/Busy Lookup

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/de...tatus_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:us**@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:us***@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
%>
Oct 26 '06 #1
2 4468
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 Exchange 2000 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:
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/de...tatus_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:us**@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:us***@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
%>
Oct 27 '06 #2
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:
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/de...tatus_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:us**@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:us***@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
%>
Oct 27 '06 #3

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

Similar topics

2
by: Adam Kinney | last post by:
I have an ASP application that logs into Exchange server to send email. The code looks like this: Set objSession = CreateObject("MAPI.Session") objSession.Logon "profileName" strMsg = ".."...
0
by: George Durzi | last post by:
Hey all, I finally found the necessary resources in the Exchange 2003 SDK to "pull" Contacts out of Exchange and display them on a WebForm. I have been trying to do this forever, and couldn't...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
1
by: jademoon | last post by:
I am having problems since we built a new Exchange Server 2003 (member server) and removed the Exchange 2000 (member server) from out network. The error comes about when an MCMS Author "submits" a...
0
by: thewulf | last post by:
I'm currently building an application which will contain a link to MS Exchange 2003. We'd like the user to the able to click the link and automatically be logged in to MS Exchange 2003 using the...
5
by: Michael | last post by:
Hello, I've created an ASP web page where users in our organization can create Active Directory computer accounts. The web page is running on a Server 2003 SP1 IIS 6 installation. The...
0
by: Suman | last post by:
Hello Group, I am relatively new to .NET. I am trying to create a user in AD and a corresponding email account in the exchange server from an ASP.NET, C# application. ...
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
0
by: rnaimon | last post by:
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. ...
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.