每個應用須有且只有一個 Server Controller.
TIWServerControllerBase 所在單元及繼承鏈:
IWServerControllerBase.TIWServerControllerBase < TIWDataModule < TDataModule < TComponent < TPersistent < TObject
主要成員:
property ContentPath: string //網站靜態內容全路徑: ...\wwwroot\
property Locked: Boolean //only read, 無用.
property StartDateTime: TDateTime //開始時間
property StartUID: string //其內部資源提取后命名時綴有這個 ID, 可能只是強調其唯一性
property GUIActive: Boolean //是否在 GUI 模式下; only read
property LicenseTracking: Boolean //
property MachineName: string //計算機名
property ProcessID: string //進程 ID, 內部用於目錄的唯一性
property Rendering: TIWRendering //兩個取值: rnInFile、rnInMemory(默認)
property CacheFiles: TStrings //緩存文件列表
property ServerVariables: TStringList //可以通過它設置全局變量
property RewriteURL: string //是配合 IIS 使用的
property AuthBeforeNewSession: Boolean //是否在創建 Session 之前驗證, 默認 False; 這和代碼寫法也有關系
property AppName: string //應用名稱
property BoundIP: string //綁定 IP
property CacheDir: string //緩存全路徑
property CharSet: string //默認 UTF8
property CacheExpiry: Integer //緩存文件保留的分鍾數
property ComInitialization: TComInitialization //COM 初始化選項; 其默認值 ciNone 表示不需要 COM
property Compression: TIWCompressionOptions //壓縮相關設置
property Description: string //程序描述
property DebugHTML: Boolean //默認 False; True 時, 最終的 Html 代碼會更易讀
property DisplayName: string //程序的顯示名稱
property Log: TLogOptions //兩個選項: loNone(默認)、loFile(將會在程序目錄保存日志)
property EnableImageToolbar: Boolean //當鼠標在圖片上時, 是否啟用圖像工具欄; 只對個別瀏覽器有效
property ExceptionDisplayMode: TIWShowMessageType //異常顯示模式: smAlert(默認)、smNewWindow、smSameWindow、smSameWindowFrame
property FilesDir: TIWDirectoryName //? 應該沒用了
property HistoryEnabled: Boolean //是否記憶頁面歷史, 允許后可使用"前進、后退"按鈕(僅在非異步狀態下)
property InternalFilesDir: TIWDirectoryName //用於 ISAPI 模式, 指定內部文件目錄
property InternalFilesURL: string //用於 ISAPI 模式
property JavascriptDebug: Boolean //是否啟用 js 調試, JavaScriptOptions 中也有
property HTMLHeaders: TStringList //添加到 Html Head 中的內容
property ContentFiles: TStringList //添加 js 或 css 鏈接
property MasterTemplate: string //指定主模板
property PageTransitions: Boolean //是否使用頁面過渡效果, 只用於個別瀏覽器
property Port: Integer //端口; 一般是隨機分配的, 設置只對獨立服務器程序有效, 不影響 ISAPI
property RedirectMsgDelay: Integer //重定向延遲(秒)
property ServerResizeTimeout: Integer //響應 OnResize 事件延遲(毫秒); 默認 0 表示立即執行
property Auther: TIWAutherBase //指定驗證控件
property ShowLoadingAnimation: Boolean //是否顯示載入動畫
property SessionTimeout: Integer //Session 超時分鍾數; 默認 20 分鍾, 有些版本限制修改
property StyleSheet: TIWFileReference //指定 *.css 文件
property SSLOptions: TIWSSLOptions //SSL 安全選項; 只用於獨立服務器程序
property TemplateDir: string //模板文件夾全路徑
property Theme: string //? 今后 IW 會使用主題嗎? 和模板如何協調?
property URLBase: string //IW 版本
property Version: string //IntraWeb 版本號
property AllowMultipleSessionsPerUser: Boolean //允許多進程訪問?
property DocType: string //指定 Html 的 DocType
property IECompatibilityMode: string //IE 兼容模式
property ShowStartParams: Boolean //開始參數是否顯示在 Url 中
property ExceptionLogger: TIWExceptionLogger //異常日志記錄器; 這也是 IW.14 新增的; 參考: http://ww2.atozed.com/docs/IW/Classes/TIWExceptionLogger.html
property CookieOptions: TIWSessionCookieOptions //Cookie 選項
property SearchEngineOptions: TIWSearchEngineOptions //
property JavaScriptOptions: TIWJavaScriptOptions //js 調試與壓縮選項
property HttpKeepAlive: Boolean //是否保存連接, 默認 False; IW.14.0.11 新增
property SecurityOptions: TIWSecurityOptions //安全選項
property UseInternalFiles: Boolean //only write; 暫未見內部有用它的地方
property OnAfterDispatch: TOnDispatch //
property OnBeforeDispatch: TOnDispatch //
property OnCloseSession: TOnCloseSessionEvent //
property OnConfig: TNotifyEvent //初始化; 常用
property OnException: TOnExceptionEvent //
property OnGetSessionID: TOnGetSessionID //
property OnNewSession: TOnNewSessionEvent //ServerController 單元已默認使用
property OnGetMainForm: TOnGetMainFormEvent //
property OnBackButton: TOnBackButtonEvent //點后退按鈕時
property OnBeforeRender: TOnBeforeRenderEvent //
property OnAfterRender: TOnAfterRenderEvent //
property OnUserTag: TOnUserTag //
property OnSessionTag: TOnSessionTag //
property OnBrowserCheck: TOnBrowserCheckEvent //瀏覽器判斷
property OnCreate: TNotifyEvent //常用
{在初始化階段幾個事件的執行順序: OnConfig、OnCreate、OnBrowserCheck、OnGetSessionID、OnNewSession、OnGetMainForm、OnBeforeRender、OnAfterRender}
function AuthActive: Boolean
class procedure SetServerControllerClass //ServerController 單元 initialization ...
class function NewCacheFile(const AContentType: string): string //建立臨時文件
//它有點復雜, 隨時補充...
