-
Notifications
You must be signed in to change notification settings - Fork 1
HOL1
Duarte Nunes edited this page Feb 23, 2011
·
4 revisions
- Clone the session's source code, used for exercises and samples, and place it in a directory henceforth known as %WCFHOME%.
You can use Git to clone the repository or download a zip (note that you may have to update the source for the exercises later on).
- Retrieve the code from the WCF HTTP codeplex page and place it in %WCFHOME%\wcf.codeplex.com. You have to create this directory.
You can use Mercurial do clone the repository or download a zip file with the sources.
Given the files in %WCFHOME%\Files, create a resource that performs lookups in that directory. The resource responds to GET requests that specify a file name.
- Decide which file is sent to the client based on the extension.
- Support special text files (.lnk extensions) that contain an URI to the actual resource, where the client should be redirected.
- Allow the file extension to be absent from the file name and employ content negotiation to identify the requested file.
- Add the Content-Location and Vary headers to the response.
If the file does not exist, a response with status code 404 is issued. For redirects, issue responses with status code 3xx.