Understanding the WebDAV Protocol - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Understanding the WebDAV Protocol

Description:

HTTP is one of the first protocols that provided for proxies in the basic ... HTTP makes it easy to separate the physical machine from the greater namespace. ... – PowerPoint PPT presentation

Number of Views:452
Avg rating:3.0/5.0
Slides: 36
Provided by: alexho7
Category:

less

Transcript and Presenter's Notes

Title: Understanding the WebDAV Protocol


1
Understanding The WebDAV ProtocolAlex
HopmannProgram ManagerExchange Server Product
UnitMicrosoft Corporation
2
(No Transcript)
3
Better Living Through HTTP, XML And Rich Storage
4
Agenda
  • HTTP 1.1
  • The WebDAV Extensions
  • Using XMLHTTP in Internet Explorer 5

5
Audience
  • Administrators
  • Understand your network traffic
  • Developers
  • Building web components to talk to Exchange

6
HTTP 1.1
  • HyperText Transfer Protocol
  • IETF RFC 2616
  • Most notably the protocol used to retrieve
    content for web browsers
  • Widely implemented and deployed today

7
HTTP 1.1 Protocol Basics
  • RequestMETHOD URI HTTP/1.1HeaderName
    HeaderValueContent-Length
    21 Request Body
  • ResponseHTTP/1.1 Status StatusTextHeader
    Name HeaderValue Response Body

8
HTTP GET
  • RequestGET /myfile.gif HTTP/1.1host
    www.myserver.comaccept /Content-Lengt
    h 0
  • ResponseHTTP/1.1 200 OKContent-type
    text/htmlContent-Length
    8274 xxxxxxxxxxxxxxxxxxxxxxxxxx
    . . .

9
HTTP 1.1
  • Supported methods
  • GET -- retrieve a resource
  • PUT -- write a resource to server
  • DELETE -- remove a resource
  • OPTIONS -- discover server capabilities
  • HEAD -- Get header information
  • POST Submit form / new item

10
Key HTTP Features
  • Scalability
  • Persistent Connections
  • Authentication
  • Connection Security
  • Proxy and Cache Support
  • Virtual Servers
  • Flexible Methods
  • Content Negotiation

11
HTTP And Scalability
  • Most widely deployed and scale proven application
    today
  • Hotmail has 40 million users
  • Big web sites run a billion requests per year
  • How?
  • Simplicity
  • The right kind of state

12
HTTP And Persistent Connections
  • Performance Optimization in HTTP 1.1
  • Persistent connections are not the same thing as
    maintaining state
  • Any request / response pair is independent from
    others
  • Proxies can aggregate requests from multiple
    users on one connection

13
HTTP And Authentication
  • Flexible framework for multiple authentication
    techniques
  • Basic HTTP included clear-text password (basic)
  • Microsoft NTLM authentication
  • Windows 2000 supports digest and kerberos

14
HTTP And Connection Security
  • SSL Secure Sockets Layer
  • Basic security approach is secure tunnel
  • Transparent to rest of protocol
  • Can also transport already secured objects (ex
    S/MIME)

15
Proxy And Cache Support
  • HTTP is one of the first protocols that provided
    for proxies in the basic framework
  • Proxy and cache support leads to basic techniques
    for scalable web services

16
Virtual Servers
  • HTTP makes it easy to separate the physical
    machine from the greater namespace.
  • The HOST header
  • Multiple virtual servers on one physical machine.
  • Multiple physical machines supporting one
    namespace
  • Exchange 2000 Front End / Back End

17
Content Negotiation
  • HTTP is based on MIME
  • Initially the web was just HTML
  • Then image/gif
  • Then image/jpeg, text/css
  • Now text/xml and whatever comes next
  • Client can request specific content-type via
    ACCEPT header

18
Flexible Methods And Headers
  • New types of methods and headers can be defined
  • OPTIONS method used to determine what extensions
    a server supports
  • HTTP/1.1 200 OK
  • Server Microsoft-IIS/5.0
  • Date Tue, 05 Oct 1999 190144 GMT
  • Content-Length 0
  • Accept-Ranges bytes
  • DAV 1, 2
  • Public OPTIONS, TRACE, GET, HEAD, DELETE, PUT,
    POST, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH,
    LOCK, UNLOCK, SEARCH

19
WebDAV
  • Web Distributed Authoring and Versioning
  • IETF RFC 2518
  • Most notably the protocol extension to HTTP that
    makes the web read/write
  • No versioning!
  • Its just the good old Internet
  • Supported by Office 2000, Internet Explorer 5.0,
    Windows 2000, IIS 5, Exchange 2000 Server.

20
WebDAV Model
  • Resources
  • Anything identified by a URL
  • Collections
  • Anything that contains resources
  • Is a resource
  • Properties
  • Associated with resources.
  • Represented by XML.

21
WebDAV Methods Part 1
  • Supported methods
  • MOVE move a resource / collection
  • COPY copy a resource / collection
  • LOCK lock a resource
  • UNLOCK unlock a resource
  • MKCOL make a collection

22
Example MOVE
  • request
  • MOVE /public/docs/test.doc HTTP/1.1
  • Destination /public/pch/test.doc
  • HOST ptdemo
  • depth infinity
  • Content-Length 0
  • response
  • HTTP/1.1 201 Created
  • Server Microsoft-IIS/5.0
  • Date Fri, 31 Jul 1999 235305 GMT
  • Location http//public/pch/test.doc
  • Content-Length 0

23
Properties
  • Supported methods
  • PROPFIND enumerate properties
  • PROPPATCH set / remove properties
  • SEARCH query properties
  • Superset of PROPFIND capabilities
  • Properties use XML model
  • XML-Namespaces
  • Actual XML representation

24
Example Properties
  • DAVcreationdate
  • DAVdisplayname
  • DAVgetcontentlength
  • DAV is an XML-Namespace
  • You can define new namespaces for custom
    properties

25
Example PROPFIND
  • PROPFIND /public/pch/test.doc HTTP/1.1
  • Host ptdemo
  • Depth 0
  • Content-Type text/xml
  • Content-Length 104

26
Building Apps With HTTP
  • OLEDB / ADO
  • Version 2.5 provides hierarchy support
  • Bind via normal URLs
  • XMLHTTP
  • Simple scripting component
  • use in web pages or client apps

27
Using MSDAIPP With ADO
  • MSDAIPP Microsoft Data Access for Internet
    Publishing
  • Same provider used by Web Folders
  • C new ActiveXObject("ADODB.Connection")
  • C.Provider "MSDAIPP.DSO"
  • C.ConnectionString "http//servername/"
  • C.Open()
  • R new ActiveXObject("ADODB.Recordset")
  • R.Open(SQLStatement, C, 0, 2, 512)

28
Iterating Over The Rowset
  • while(!R.eof)
  • outputhere.innerHTML R.Fields("DAVdisplayname"
    ) "   size " R.Fields("DAVgetcontentlength"
    ) "
    "
  • R.movenext()

29
XMLHTTP
  • Simple scripting interface for HTTP
  • open(method, url, async, user, pass)
  • setRequestHeader(header, value)
  • send(value)
  • getResponseHeader(header)
  • responseText
  • responseXML
  • onreadystatechange
  • readyState

30
Asynchronous Operation
  • Avoid locking client
  • Set a callback routine
  • When readyState 4 response is
    availablefunction requestdone()
  • if(httprequest null httprequest.readyState
    ! 4)
  • returnhttprequest null
  • // do something here

31
XMLHTTP Example And Demo
  • function doquery()
  • xsldest.innerHTML "loading..."
  • request new ActiveXObject("microsoft.xmlhttp")
  • request.open("PROPFIND", urlid.value, false)
  • request.setRequestHeader("depth", "1")
  • request.send("")
  • xsldest.innerHTML request.responseXML.transform
    Node(calxsl.documentElement)

32
Other Sessions
  • 5-303 Wednesday 1030 am Building Web Solutions
    with XML and XSL
  • 5-302 Wednesday 115 pm Building Solutions for
    Internet Explorer 5
  • 5-305 Thursday 1030 am Building Web
    Applications Using Exchange 2000 Outlook Web
    Access Components

33
Web References
  • Information on Microsoft Standardshttp//msdn.m
    icrosoft.com/standards/
  • Information on XML http//msdn.microsoft.com/xml/
  • XMLHTTPhttp//msdn.microsoft.com/xml/reference/sc
    riptref/XMLHttpRequest_object.asp

34
Questions?
  • HTTP is great for scalable, efficient
    applications
  • WebDAV makes it richer and non-static
  • Microsoft provides easy tools to build
    applications using this technology

35
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com