2008/08/28

Application, Page and Control events in ASP.NET v2.0 - Jeff's Junk

Application, Page and Control events in ASP.NET v2.0 - Jeff's Junk

Application, Page and Control events in ASP.NET v2.0 發生順序的列表

Application: BeginRequest
Application: PreAuthenticateRequest
Application: AuthenticateRequest
Application: PostAuthenticateRequest
Application: PreAuthorizeRequest
Application: AuthorizeRequest
Application: PostAuthorizeRequest
Application: PreResolveRequestCache
Application: ResolveRequestCache
Application: PostResolveRequestCache
Application: PreMapRequestHandler
Page: Construct
Application: PostMapRequestHandler
Application: PreAcquireRequestState
Application: AcquireRequestState
Application: PostAcquireRequestState
Application: PreRequestHandlerExecute
Page: AddParsedSubObject
Page: CreateControlCollection
Page: AddedControl
Page: AddParsedSubObject
Page: AddedControl
Page: ResolveAdapter
Page: DeterminePostBackMode
Page: PreInit
Control: ResolveAdapter
Control: Init
Control: TrackViewState
Page: Init
Page: TrackViewState
Page: InitComplete
Page: LoadPageStateFromPersistenceMedium
Control: LoadViewState
Page: EnsureChildControls
Page: CreateChildControls
Page: PreLoad
Page: Load
Control: DataBind
Control: Load
Page: EnsureChildControls
Page: LoadComplete
Page: EnsureChildControls
Page: PreRender
Control: EnsureChildControls
Control: PreRender
Page: PreRenderComplete
Page: SaveViewState
Control: SaveViewState
Page: SaveViewState
Control: SaveViewState
Page: SavePageStateToPersistenceMedium
Page: SaveStateComplete
Page: CreateHtmlTextWriter
Page: RenderControl
Page: Render
Page: RenderChildren
Control: RenderControl
Page: VerifyRenderingInServerForm
Page: CreateHtmlTextWriter
Control: Unload
Control: Dispose
Page: Unload
Page: Dispose
Application: PostRequestHandlerExecute
Application: PreReleaseRequestState
Application: ReleaseRequestState
Application: PostReleaseRequestState
Application: PreUpdateRequestCache
Application: UpdateRequestCache
Application: PostUpdateRequestCache
Application: EndRequest
Application: PreSendRequestHeaders
Application: PreSendRequestContent

來源 : Jeff's Junk

ConSonic 8GB 玩美時尚碟

2008/08/05

PowerSheel ADO.NET SQLAdapter Timeout Error

Ben.geek.nz » ADO.NET SQLAdapter Timeout Error

在使用PowerShell寫批次時,用到SqlDataAdapter的Fill時,常會遇到timeout的情況,如:


$ds= new-object "System.Data.DataSet" "ds"
$adapter = new-object "System.Data.SqlClient.SqlDataAdapter"
$adapter.SelectCommand = new-object "System.Data.SqlClient.SqlCommand" ($sql, $conn);

if ($adapter2.Fill($dstoprank) -gt 0) #在這裡會出現timeout error


解決方案:


myAdapter.SelectCommand.CommandTimeout = int.MaxValue; //(.Net)

or


$adapter.SelectCommand.CommandTimeout = 2147483647; # int.MaxValue (PowerShell)

T-SQL 語法風格