Wiley 978-0-470-38137-3 Datasheet

Browse online or download Datasheet for Software manuals Wiley 978-0-470-38137-3. Wiley Expert WSS 3.0 and MOSS 2007 Programming User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 52
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
The SharePoint 2007
Architecture
SharePoint 2007 is an extension of ASP.NET and IIS. This chapter walks through the main
architectural components of IIS and ASP.NET and shows you how these components are extended
to add support for SharePoint functionalities.
Because IIS is one of the many options for hosting ASP.NET, the discussion begins with the
coverage of the ASP.NET hosting environment where HTTP worker requests and runtime classes
are discussed. Next, the chapter covers IIS concepts such as web sites and application pools
followed by discussions of the related SharePoint object model classes. The ASP.NET HTTP
Runtime Pipeline and the SharePoint extensions to this pipeline are discussed in depth. You ll also
learn about the ASP.NET dynamic compilation model and the role it plays in SharePoint.
ASP.NET Hosting Environment
One of the great architectural characteristics of the ASP.NET Framework is its isolation from its
hosting environment, which allows you to run your ASP.NET applications in different hosting
scenarios such as IIS 5.0, IIS 5.1, IIS 6.0, IIS 7.0, or even a custom managed application. This section
discusses these architectural aspects of the ASP.NET Framework as well as the most common
hosting scenario, IIS.
Hosting ASP.NET
As mentioned, ASP.NET can be hosted in different environments, such as IIS 5.0, IIS 6.0, IIS 7.0, or
even a custom managed application such as a console application. Hosting ASP.NET in a given
environment involves two major components:
Worker request class. This is a class that directly or indirectly inherits from the
HttpWorkerRequest abstract base class. As you ll see later, an ASP.NET component named
HttpRuntime uses the worker request class to communicate with the underlying
environment. All worker request classes implement the HttpWorkerRequest API,
c01.indd 1c01.indd 1 9/20/08 6:49:26 AM9/20/08 6:49:26 AM
COPYRIGHTED MATERIAL
Page view 0
1 2 3 4 5 6 ... 51 52

Summary of Contents

Page 1 - COPYRIGHTED MATERIAL

The SharePoint 2007 Architecture SharePoint 2007 is an extension of ASP.NET and IIS. This chapter walks through the main architectural

Page 2 - HttpWorkerRequest

Chapter 1: The SharePoint 2007 Architecture10Listing 1 - 3 (continued) < head runat=”server” > < title > Untitled Page < /title >

Page 3 - Runtime Class

Chapter 1: The SharePoint 2007 Architecture11 < %@ Import Namespace=”System.Globalization” % > < !DOCTYPE html PUBLIC “-//W3C//DTD XHTM

Page 4 - Application Pools

Chapter 1: The SharePoint 2007 Architecture12 The following list describes some of the public properties of the SPWebApplication class: AllowAccess

Page 5

Chapter 1: The SharePoint 2007 Architecture13 The following list presents the public methods of the SPWebApplication class: Delete. This deletes t

Page 6 - SharePoint Extensions

Chapter 1: The SharePoint 2007 Architecture14 The following code listing presents a web page that uses the SharePoint object model to display the name

Page 7

Chapter 1: The SharePoint 2007 Architecture15 ApplicationPoolId. This gets or sets a string that contains the GUID that uniquely identifies the app

Page 8 - SPI isWebSite

Chapter 1: The SharePoint 2007 Architecture16 The following code listing creates and provisions a new web application: < %@ Page Language=”C#” % &

Page 9

Chapter 1: The SharePoint 2007 Architecture17 DefaultDatabaseInstance. This gets or sets a reference to the SPDatabaseServiceInstance object that r

Page 10 - Listing 1 - 3 (continued)

Chapter 1: The SharePoint 2007 Architecture18 The following code listing iterates through the application pools for each web service and prints their

Page 11 - SP WebApplication

Chapter 1: The SharePoint 2007 Architecture19 Listing 1 - 4: The ProcessRequest method of ISAPI Runtime public int ProcessRequest(IntPtr ecb, int

Page 12

Chapter 1: The SharePoint 2007 Architecture2which isolates HttpRuntime from the environment - specific aspects of the communications between HttpRunti

Page 13

Chapter 1: The SharePoint 2007 Architecture20 It calls the GetApplicationInstance method of an ASP.NET class named HttpApplicationFactory to return a

Page 14 - SP WebApplicationBuilder

Chapter 1: The SharePoint 2007 Architecture21generates on the fly from the content of the global.asax file. In other words, the GetApplicationInstance

Page 15

Chapter 1: The SharePoint 2007 Architecture22obvious case is when you run a program such as an antivirus program that changes this timestamp even thou

Page 16 - SP WebService

Chapter 1: The SharePoint 2007 Architecture23 SharePoint uses the same approach to introduce a code - behind class named SPHttpApplication. This means

Page 17

Chapter 1: The SharePoint 2007 Architecture24 Listing 1 - 8: The IHttpModule interface public interface IHttpModule{ void Dispose(); void Init(Ht

Page 18 - ISAPI Runtime

Chapter 1: The SharePoint 2007 Architecture25 Event Description PostRequestHandlerExecute Fires after ASP.NET executes the reques

Page 19

Chapter 1: The SharePoint 2007 Architecture26named BuildSteps and ExecuteStage where the former creates these IExecutionStep objects and the latter ca

Page 20

Chapter 1: The SharePoint 2007 Architecture27 Listing 1 - 9 presents the internal implementation of the SPHttpApplication class. Listing 1 - 9: T

Page 21

Chapter 1: The SharePoint 2007 Architecture28Listing 1 - 9 (continued) { readerWriterLock.ReleaseWriterLock(); } } } public

Page 22

Chapter 1: The SharePoint 2007 Architecture29the HTTP modules that are added first get to register their event handlers first. This means that when th

Page 23 - HttpApplication

Chapter 1: The SharePoint 2007 Architecture3 Runtime Class The ASP.NET 2.0 Framework comes with two important runtime classes named ISAPIRuntime and

Page 24 - void Dispose();

Chapter 1: The SharePoint 2007 Architecture30 Listing 1 - 11: The portion of the implementation of the Init method of the SP RequestModule public

Page 25

Chapter 1: The SharePoint 2007 Architecture31request for any site page instance of the associated page template. If so, SharePoint loads the page temp

Page 26 - SP HttpApplication

Chapter 1: The SharePoint 2007 Architecture32 Take these steps if you need to customize the behavior of the SPVirtualPathProvider: 1. Implement a

Page 27 - (continued)

Chapter 1: The SharePoint 2007 Architecture33 Listing 1 - 13: The IHttpHandlerFactory interface public interface IHttpHandlerFactory{ IHttpHandler

Page 28 - SP RequestModule

Chapter 1: The SharePoint 2007 Architecture34 The Execute method of the IExecutionStep object associated with the MapRequestHandler event searches the

Page 29

Chapter 1: The SharePoint 2007 Architecture35 Listing 1 - 15: The web.config file < configuration > < system.web > < httpHand

Page 30 - SP VirtualPathProvider

Chapter 1: The SharePoint 2007 Architecture36 Note that this HTTP handler implements the IHttpAsyncHandler interface, which in turn extends the standa

Page 31

Chapter 1: The SharePoint 2007 Architecture37 Listing 1 - 18 presents the internal implementation of the BeginExecuteUrlForEntireResponse method.

Page 32 - bool IsReusable { get; }

Chapter 1: The SharePoint 2007 Architecture38 Next, it determines the authentication type: string authenticationType = context.User.Identity.Authentic

Page 33

Chapter 1: The SharePoint 2007 Architecture39 As you can see, the DefaultHttpHandler HTTP handler provides a powerful approach to custom request proce

Page 34 - SP HttpHandler

Chapter 1: The SharePoint 2007 Architecture4ISAPI extension module named aspnet_isapi.dll. This module, like any other ISAPI module, is a Win32 dynami

Page 35

Chapter 1: The SharePoint 2007 Architecture40 { uint num; base.ExecuteUrlHeaders.Add(this.AuthModeHeader, “Forms”); if (SPSecurity.U

Page 36

Chapter 1: The SharePoint 2007 Architecture41 Note that OverrideExecuteUrlPath also stores the authentication and authorization information into the E

Page 37

Chapter 1: The SharePoint 2007 Architecture42 Developing Custom HTTP Handler Factories, HTTP Handlers, and HTTP Modules Deep integration of Sh

Page 38

Chapter 1: The SharePoint 2007 Architecture43 Now introduce a compilation error and hit F5 to compile the page. You should get the page shown in Figur

Page 39

Chapter 1: The SharePoint 2007 Architecture44 When you hit F5, the ASP.NET build environment performs these tasks: 1. Parses the MySimplePage.asp

Page 40 - Listing 1 - 19 (continued)

Chapter 1: The SharePoint 2007 Architecture45 As you can see, this popup menu contains an entry for the ASP namespace. If you add a dot after ASP, you

Page 41

Chapter 1: The SharePoint 2007 Architecture46 As mentioned, the ASP.NET build environment temporarily stores the source code for this dynamically gene

Page 42

Chapter 1: The SharePoint 2007 Architecture47 You may be wondering why the Default class shown in Listing 1 - 23 implements the IRequiresSessionStat

Page 43

Chapter 1: The SharePoint 2007 Architecture48 Notice that the directory whose content is shown on the right panel of the Windows Explorer shown in Fig

Page 44

Chapter 1: The SharePoint 2007 Architecture49 Listing 1 - 26: The default.aspx.cdcab7d2 compiled file < ?xml version=”1.0” encoding=”utf-8”? &g

Page 45

Chapter 1: The SharePoint 2007 Architecture5 The w3wp.exe executable is an IIS 6.0 - specific executable located in the following IIS - specific direc

Page 46

Chapter 1: The SharePoint 2007 Architecture50 If the old assembly doesn ’ t contain any other classes, ASP.NET attempts to remove it from the ASP.NET

Page 47

Chapter 1: The SharePoint 2007 Architecture51database. When a request for the home page of one of these sites arrives, the SPVirtualPathProvider loads

Page 48

Chapter 1: The SharePoint 2007 Architecture52 When you provision a SharePoint web application, SharePoint automatically registers all standard ASP.NET

Page 49

Chapter 1: The SharePoint 2007 Architecture6 IIS 6.0 introduces a new kernel - mode component named the HTTP Protocol Stack (http.sys) that eliminates

Page 50

Chapter 1: The SharePoint 2007 Architecture7 Farm. This read - only property gets a reference to the SPFarm object that represents the SharePoint f

Page 51

Chapter 1: The SharePoint 2007 Architecture8Listing 1 - 2 (continued) foreach (SPApplicationPool ap in apc) { Response.Write(ap.Name)

Page 52 - Summary

Chapter 1: The SharePoint 2007 Architecture9 ServerComment. This gets or sets a string that contains the display name of the IIS web site that the

Comments to this Manuals

No comments