a close look inside the sharepoint engine randy williams, mvp moss synergy corporate technologies...
TRANSCRIPT
A Close Look Inside the SharePoint Engine
Randy Williams, MVP MOSS
Synergy Corporate Technologies
Session Overview
• SharePoint as a Product and Technology• Provisioning Engine
● IIS● SQL Server● Application / Site Pages (12 Hive)
• Execution Engine● ASP.NET
• Virtualization and Redirection
SharePoint Product Stack
Windows Server
IIS
.NET Framework
WSS
ADSQL
Server
MOSS
SharePoint Layers
.NET 2.0 Framework
.NET 3.0 Framework
WSS & MOSS UI
Windows APIOS
.NET
SharePointTechnologies(API)
Web Services
SharePointProducts
SharePoint Object Models
Layers in Action
Object Model
UI
Windows API
Web Services
.NET Framework
WordBrowserClient
Server
External Systems
Role of IIS
• Requests are directed to IIS Web Site● Defined by IP address, port & host header
• Virtual Directories• Application Pools
● Defines worker processes (w3wp.exe) ● Isolation vs efficiency● Process identity
• Coordinates authentication● Active Directory (Kerberos/NTLM/Basic)● LDAP / FBA
ASP.NET
• Part of .NET Framework 2.0• Integrates with IIS via ISAPI extension
● aspnet_isapi.dll• Provides processing engine for pages
● .aspx, .ascx, .master, etc.• Configured using web.config
web.config
• XML file for SharePoint configuration• One per web application• Controls provisioning engine• Controls authentication• Defines security
Provisioning Web Applications
• SharePoint creates/extends IIS Web Site● Creates files inside inetpub\wwwroot● Customizes web.config● Creates four virtual directories● Replicates this on multiple WFEs
• Done using Central Admin or stsadm• Requires farm-level admin• All site collections and webs are virtual
Role of SQL Server
• Repository for config, search, and content databases
• Config database● Farm-wide configuration settings
• Accessing tables directly is strongly discouraged and unsupported
SQL Content Database
• Container for site collections● Holds all SharePoint content
• Basic rules● Web application can have more than one● One database cannot span Web applications● One site collection cannot span db’s
• With Windows authentication, login to SQL is with app pool identity
SQL Content Database
• When creating a site collection● SharePoint selects “most available” db
• Based on site warning and max number levels
● STSADM –o createsiteinnewdb to specify● STSADM –o mergecontentdbs to move
• Best practices● Keep db’s small (< 100-200 GB)● Spread site collections among multiple db’s
Demo - Provisioning Web Application
12 Hive
• SharePoint’s file system components● C:\Program Files\Common Files\Microsoft Shared\
web server extensions\12\
• Contains:● Application pages● User controls● Web services● Assemblies and executables● Site definitions● Features
12 Hive
• Web Service files
• Admin Pages
• User Controls
• Features
• Images
• Application Pages
• Site Definitions
• Custom Field Types
SharePoint as a Provisioning Engine
• Primary design goals● Scalable● Flexible (Customizable)
• Challenges in achieving both• The solution is to support different types of
pages● Application pages● Site pages
Application Pages
• Farm wide - stored in 12 Hive● Referenced in _layouts virtual directory
• Shared by all webs, site collections and web applications
• Example● http://contoso/_layouts/settings.aspx● http://contoso/web/_layouts/settings.aspx● http://www.contoso.com/_layouts/settings.aspx
Site Pages
• Consist of list pages, home pages, master pages, new pages created, and others● NewForm.aspx, default.aspx, mypage.aspx
• Can be stored in 12 Hive or content database
• Can be customized using SPD● Customized vs uncustomized
Uncustomized Pages
• Similar to application pages• Stored in 12 Hive
● SiteTemplates & Features folders• Page is virtualized across multiple
SharePoint webs• Pages are compiled and code is cached• Very scalable• AKA ghosted pages
Customized Pages
• Site page that has been modified using SPD
• Now stored in content db• Page is not compiled
● Security risks• Page is not cached• Much slower due to overhead• Very flexible
Virtualization and Redirection
• Q: How does SharePoint support both customized & uncustomized pages?
• A: By a virtual path provider called SPVirtualPathProvider
• Part of SPRequest HTTP module● Referenced in web.config
• Based on ASP.NET 2.0 technology
SharePoint’s HTTP Request Pipeline
Browser W3wp.exe
ASP.NET ISAPI
SPVirtualPathProvider
Content db
File System
Customized
Uncustomized
HTTP.SYS
Site Page Rendering
Master Page
NavCSS JS
Images
WebPartManager
Site Page
Master PageWeb
Parts
WebPartZoneWebPartZones
DelegateControls
ContentPlace
Holders
Questions?
• My blog● http://sharepointhawaii.com/randywilliams