Try this.....
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
Dim handler As System.Web.IHttpHandler = System.Web.HttpContext.Current.Handler
If Not handler Is Nothing AndAlso TypeOf handler Is System.Web.UI.Page Then
Dim page As System.Web.UI.Page = DirectCast(handler, System.Web.UI.Page)
'use page object
End If
ServiceManager.GetService(Of ICacheSyncService)().DoSyncPurge()
End Sub
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
Dim handler As System.Web.IHttpHandler = System.Web.HttpContext.Current.Handler
If Not handler Is Nothing AndAlso TypeOf handler Is System.Web.UI.Page Then
Dim page As System.Web.UI.Page = DirectCast(handler, System.Web.UI.Page)
'use page object
End If
ServiceManager.GetService(Of ICacheSyncService)().DoSyncPurge()
End Sub