MSG330 Developing with Microsoft® Exchange Susan Hill Lead Programmer Writer Microsoft Corporation.
-
Upload
gabriel-hancock -
Category
Documents
-
view
218 -
download
0
Transcript of MSG330 Developing with Microsoft® Exchange Susan Hill Lead Programmer Writer Microsoft Corporation.
MSG330
Developing with Microsoft® Exchange
Susan HillLead Programmer WriterMicrosoft Corporation
Agenda
Overview of Exchange 2003General Design GuidelinesMessaging ScenariosCalendaring ScenariosCustomizing Exchange Behavior with Store EventsComponentizing with Web ServicesLooking forward to XSO
Overview of Exchange 2003
Exchange 2003What still works?
Data access methodsCDO for Exchange 2000 (CDOEX)ADO access using ExOLEDBADO access using MSDAIPPCDO 1.2x (server and client)HTTP and WebDAV Extended MAPI (MAPI) CDO for Exchange Management (CDOEXM)
Events and notificationsExOLEDB store eventsTransport eventsMAPI notificationsWebDAV notificationsIncremental Change Synchronization (ICS)Exchange 5.5 event agent service
Application technologiesExchange Web formsExchange 2000 workflow modelExchange 5.5 routing engine
Exchange 2003What’s changed?
Heavy focus on security fixesImproved ExOLEDB startup performanceFixed the 256 logon limitation in WebDAV
Ex 2000 and Ex 2003 Hotfix; Ex 2003 SP1
Secure by Default Exchange Domain Servers security group locked down by defaultPermission denied by default to create top level folders
Exchange 2003What’s new?
Managed wrapper for transport event sinks
MSG 332: Developing Transport Event Messaging Solutions for Windows and Exchange
Additional WMI providersMSG 334: Creating Exchange Administrative Scripting for the Non-Programmer
General Design Guidelines
Exchange ApplicationsBest Bets
Fundamental collaboration servicesCalendaring, Messaging, Contacts, etc.Web services, ASPX/ASP, public folder apps
Customizing Exchange BehaviorEvents and notificationsStand-alone or application enhancers
Customizing a ClientModifying Outlook, OWA
Person-to-person workflowExchange Workflow
Exchange management applicationsCDOEXM, WMI, Active Directory
Specialized applications (infrastructure) Anti-virus, backup/restore
Exchange Resource Options
Resource mailboxExposes server-side services such as scheduling logic and AV scanningUses a “provider” access modelMore flexibility in applying quotas
Public folderAllows ad-hoc creationBuilt-in access roles (reviewer, editor, publishing author, etc)Accessible by default through Outlook or OWA
Resource MailboxResource Mailbox
demodemo
Data Access Guidelines Binaries deployed on the Exchange server
Application scenariosStore events
Transport events
Web services
ASP / ASPX applications
Data accessCDOEx, ExOLEDB (native ADO)
Others: CDO 1.2, MAPI
Data Access Guidelines Binaries deployed on another server or client
Application scenariosTransport events
Web services
ASP / ASPX applications
Data accessWebDAV, System.Web.Mail, CDOSYS
Others: CDO 1.2, MAPI, MSDAIPP (native ADO), Outlook object model (OOM)
Data Access Guidelines Application written in managed code
Application scenariosWeb servicesASPX applications
Data accessDeploying on the Exchange server
CDOEx, ExOLEDB
Deploying on another server or clientWebDAV, System.Web.MailOthers: CDOSYS, OOM
Messaging Scenarios
Creating Newsletter Generators
Just want to generate a bunch of e-mail
CDOSYS is the best betShips in Windows (2000, XP, 2003)
Pure subset of CDOExReplaced by CDOEx on Exchange servers
Sends mail using SMTP port, pickup directory, or Exchange
Sending Mail in ASP.Net
System.Web.MailOptimized for ASP .NetWrapper to CDOSYSNo POP support
WebDAVUses the DAV:submissionuriMust have the user's credentials or Send On Behalf Of rights for that mailbox Only method that writes to the Sent Items folder
CDOExApplication must reside on the Exchange ServerMaintains custom properties
Sending Mail from an Sending Mail from an ASP.Net ApplicationASP.Net Application
demodemo
Calendaring Scenarios
Calendaring In .NET Apps Querying a calendar
WebDAV, (ExOLEDB)
Dates must be UTC normalized time
Dim sSQL As String = "SELECT "
sSQL += """urn:schemas:httpmail:subject"" AS subject, "
sSQL += """urn:schemas:calendar:dtstart"" AS startTime, "
sSQL += """urn:schemas:calendar:dtend"" AS endTime "
sSQL += " FROM SCOPE(‘SHALLOW TRAVERSAL OF """ & urlFld & """')"
sSQL += " WHERE (""urn:schemas:calendar:dtend"" < '" &
Format(utcEnd, "yyyy/MM/dd hh:mm:ss") + "')"
sSQL += " AND (""urn:schemas:calendar:dtstart"" > '" &
Format(utcStart, "yyyy/MM/dd hh:mm:ss") + "')"
sSQL += " ORDER BY ""urn:schemas:calendar:dtstart"" ASC"
Calendaring In .NET Apps Creating appointments and scheduling meetings
WebDAVAppointments are easy enough but meetings are tough (KB 308373)Must provide UID
OWA commandsEasy to schedule meetingsNot recommended because OWA reserves the right to change any calls
CDOExEasiest to useApplication must reside on the Exchange server
Calendaring from an Calendaring from an Application Server Using Application Server Using WebDAVWebDAV
demodemo
Querying for Free/Busy Information
Free/busy interfaces (CDOEx, OWA)General access to anyone’s published dataEasier to determine open slotsRequires a call to Active Directory to resolve the target addressData could be stale
Query a calendar directly (WebDAV, ADO)Public folders and resource mailboxesBest suited for finding previous bookingsRequires permission to view the calendarExisting data can be more up-to-date
Using Free/Busy Interfaces
CDOEx GetFreeBusy () method Exchange Docs SDKMust be on the Exchange server
OWA Freebusy commandhttp://Server_Name/public/?cmd=freebusy&start=ISO8601time&end=ISO8601time&interval=minutes&u=SMTP address [&u=user2&u=user3]
Both return integers representing the free/busy status for a particular interval
0:free; 1:tentative; 2:busy; 3:out of office; 4 unknown
Using OWA to Get Free/ Using OWA to Get Free/ Busy InformationBusy Information
demodemo
Customizing Exchange Behavior with Store Events
Basics of Store Events
Can be used on public folders and mailboxesSave, Delete, Timer, MDBStartup, MDBShutdown
Exposed via ExOLEDB.DLLMust run on the server
Two steps:Build the event sink and encapsulate it in a COM+ package
Create a store event registration bindingExchange Explorer Tool (Exchange Tools SDK)
Regevent utility (Exchange SDK)
Creating Store Event Sinks with Visual Studio .NET
Create a new class project
Derive the class from ServicedComponent
Strongly name an interop version of ExOLEDB.DLL and reference it
Add info on the target COM+ package
Strongly name the assembly
Register the assembly with regsvcs.exe
Automatically Processing Automatically Processing Requests in a Resource Requests in a Resource MailboxMailbox
demodemo
Using Web Services
Why Use Web Services with Exchange?
Can provide access to Exchange data outside of the firewall
Allows you to encapsulate and remote Exchange functionality
Easier to incorporate Exchange into existing applications
Building Web Services for Exchange 2000
General web service guidelines apply
Things to think about:Where will you store the web service?
What data access method will you use?
Which side of the firewall are your users?
Who will the Web service run as?
What do you want to do with the returned data?
Calendaring Web Calendaring Web ServiceService
demodemo
Code Name… XSO
XSO Overview
Managed code class libraryLeverages .NET Framework data types and classesTalks WebDAV to Exchange 2003
RemotableWorks anywhere with CLR installedMakes it easier to build .NET applications
IntuitiveTargets the enterprise developerDon’t need to be an Exchange expert to use it
Public beta expected to be available this fall
Sample XSO CodeDim mbx As ItemStore = New ItemStore()With mbx
.Source = strName + "@pangea.com"
.Credentials = New NetworkCredential( _strName, strpassword, "PANGEA.COM")
.Open()End With
Dim tsk As Task = New Task()With tsk
.Subject = "Task class" .Start = DateTime.Now .Due = .Start.AddDays(2) .Reminder = .Due.AddHours(-4) .Body.Text = "Build the task class!"End WithMbx.Folders(“Tasks”).Items.Add(tsk)
Summary
Use CDOEX and ExOLEDB when the source code runs on the Exchange serverUse System.Web.Mail or WebDAV when the source code must run elsewhereYou can build store and transport event sinks in managed code Web services expand the Exchange data access options and make it easier to codeXSO is the future
Resources
http://msdn.microsoft.com/exchangeExchange SDK downloads
Samples and DocumentationToolsWorkflow Designer
White papersWriting Managed Sinks for SMTP and Transport EventsExchange 2003 Developer Roadmap (Summer ’03)
Exchange XML Web Services ToolkitAdditional helpful sites:
HTTP://www.WebStorageD2D.com/HTTP://www.CDOLive.com/HTTP://www.slipstick.com/
Send comments, suggestions, etc. (especially on XSO!) to:[email protected]
Exchange Community Resources
Exchange Community Web Pagehttp://www.microsoft.com/exchange/community
Exchange Newsgroupshttp://www.microsoft.com/exchange/community/newsgroups
Attend s Free Chat or Webcasthttp://www.microsoft.com/exchange/community/webcasts.asp Some recent Exchange webcasts still available for viewing
Exchange 2003 Overview: http://www.microsoft.com/usa/Webcasts/ondemand/1589.aspDecide between Exchange 2000 & Exchange 2003: http://searchwin2000.techtarget.com/content/0,290959,sid1_gci875523,00.html
Locate A Local User Grouphttp://microsoft.com/communities/usergroups/default.mspx
Exchange Developer Focus Groups
Give us feedback about your Exchange development experience
Today at 14:00
Tomorrow at 14:00
Sign upSee me after this session
Related Sessions
MSG 331: Exchange Server 2000/2003 Software Development Kit
Thursday, 03 July 11:45 - 13:00
MSG 334: Creating Exchange Administrative Scripting for the Non-Programmer
Thursday 03 July 16:45 - 18:00
MSG 332: Developing Transport Event Messaging Solutions for Microsoft® Windows® and Microsoft Exchange Server
Friday, 04 July 08:30 - 09:45
Ask The ExpertsGet Your Questions Answered
16:00 this afternoon
Suggested Reading And Resources
The tools you need to put technology to work!The tools you need to put technology to work!
TITLETITLE AvailableAvailable
Programming Microsoft® Programming Microsoft® Outlook® and Microsoft Exchange Outlook® and Microsoft Exchange 2003, Third Edition: 0-7356-1464-42003, Third Edition: 0-7356-1464-4
TodayToday
Microsoft® Exchange Server Microsoft® Exchange Server 2003 Administrator's 2003 Administrator's Companion: 0-7356-1979-4Companion: 0-7356-1979-4
TodayToday
Microsoft Press books are 20% off at the TechEd Bookstore
Also buy any TWO Microsoft Press books and get a FREE T-Shirt
Community Resources
Community Resourceshttp://www.microsoft.com/communities/default.mspx
Most Valuable Professional (MVP)http://www.mvp.support.microsoft.com/
NewsgroupsConverse online with Microsoft Newsgroups, including Worldwidehttp://www.microsoft.com/communities/newsgroups/default.mspx
User GroupsMeet and learn with your peershttp://www.microsoft.com/communities/usergroups/default.mspx
evaluationsevaluations
© 2003 Microsoft Corporation. All rights reserved.© 2003 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.