473,722 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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**@e xample.com" command parameter values to the URL string.
strUrl="https://" & strServer & "/public/?cmd=freebusy" & _
"&start=200 6-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=crea teobject("Msxml 2.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.setR equestHeader "Content-Type", "text/xml"

' Set the Content-Length header.
objRequest.setR equestHeader "Content-Length", 0

' Set the Accept-language header.
objRequest.setR equestHeader "Accept-Language", "en-us"

' Send the GET method request.
objRequest.send

' The request was successful.
If 200 = objRequest.stat us Then
' Uncomment this line to see the XML response.
response.write( objRequest.resp onsetext)

' Create the DOM document.
Set objDoc = createobject("m sxml2.domdocume nt")

' Load the XML response body.
If objDoc.loadXml( objRequest.Resp onseText) 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=obj Doc.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.sel ectSingleNode(" a:displayname")

' Use an XPath query to get the WM:fbdata node
' from the WM:item node.
set objFBNode = objItemNode.sel ectSingleNode(" 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.stat us & " " & objRequest.stat ustext)
End if

' Clean up.
Set objRequest = nothing
Set objDoc = nothing
%>
Oct 26 '06 #1
2 4477
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**@e xample.com" command parameter values to the URL string.
strUrl="https://" & strServer & "/public/?cmd=freebusy" & _
"&start=200 6-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=crea teobject("Msxml 2.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.setR equestHeader "Content-Type", "text/xml"

' Set the Content-Length header.
objRequest.setR equestHeader "Content-Length", 0

' Set the Accept-language header.
objRequest.setR equestHeader "Accept-Language", "en-us"

' Send the GET method request.
objRequest.send

' The request was successful.
If 200 = objRequest.stat us Then
' Uncomment this line to see the XML response.
response.write( objRequest.resp onsetext)

' Create the DOM document.
Set objDoc = createobject("m sxml2.domdocume nt")

' Load the XML response body.
If objDoc.loadXml( objRequest.Resp onseText) 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=obj Doc.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.sel ectSingleNode(" a:displayname")

' Use an XPath query to get the WM:fbdata node
' from the WM:item node.
set objFBNode = objItemNode.sel ectSingleNode(" 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.stat us & " " & objRequest.stat ustext)
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**@e xample.com" command parameter values to the URL string.
strUrl="https://" & strServer & "/public/?cmd=freebusy" & _
"&start=200 6-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=crea teobject("Msxml 2.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.setR equestHeader "Content-Type", "text/xml"

' Set the Content-Length header.
objRequest.setR equestHeader "Content-Length", 0

' Set the Accept-language header.
objRequest.setR equestHeader "Accept-Language", "en-us"

' Send the GET method request.
objRequest.send

' The request was successful.
If 200 = objRequest.stat us Then
' Uncomment this line to see the XML response.
response.write( objRequest.resp onsetext)

' Create the DOM document.
Set objDoc = createobject("m sxml2.domdocume nt")

' Load the XML response body.
If objDoc.loadXml( objRequest.Resp onseText) 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=obj Doc.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.sel ectSingleNode(" a:displayname")

' Use an XPath query to get the WM:fbdata node
' from the WM:item node.
set objFBNode = objItemNode.sel ectSingleNode(" 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.stat us & " " & objRequest.stat ustext)
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
4716
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 = ".." Set objMessage = objSession.Outbox.Messages.Add objMessage.Subject = "Customer Comment" objMessage.Text = strMsg
0
2022
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 until the Exchange 2003 SDK came out. Here's the code. Hopefully someone else can find this useful. #region DisplayExchangeContacts private void DisplayExchangeContacts() {
8
3421
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 added. Converting the type library to a .Net assembly failed. A depended type library 'CDO' could not be converted to a .NET assembly. A dependent type library 'ADODB' could not be converted to a .NET assembly. Item has already been added." ...
1
1278
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 web page. Using the MCMS Workflow, this hooks into smtp and delivers mail to the editors. Since the changeover in exchange servers this functionability no longer works. Environment: First Server: MCMS 2002 Server Enterpise SP1a
0
1003
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 web interface but without asking them to retype their authentication information in the popup box. We've tried the classic http://user:password@server/exchange but this comes back with ann "Invalid Syntax Error" in the web browser (IE6). Any...
5
4871
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 Exchange System Manager is running on the web server and Exchange SP2 has been installed. The IIS site is configured with Basic Authentication and users are prompted to enter their Active Directory credentials when connecting to the site.
0
1574
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. ----------------------------- I have a problem wherein I am able to create a user but am unable to create a mailbox for the user. I "WAS" using exchange 2000.
0
3840
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 for the first time versus when the form is posted (sent to the server), which allows you to program accordingly. · What are user controls and custom controls? Custom controls: A control authored by a user or a third-party software vendor that...
0
3611
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. 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 ...
0
9238
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9157
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6681
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.