Hi All,
I have created a version of DNN 4.3.6 that will work on RedFox hosting. Please note the following
- It requires ASP.Net 2 since it is the version 4 of DNN. (I have not produced a version 3 for .Net 1.1 and will not be)
- Basically I have created a version that does not do the EventQueue code has been removed from the App Start and I have created a schedule that will execute this code.
[COLOR=#000000]Below are more details on what I have changed
Global.asax.vb
In the Application_Start start method added the following to the top of the method
Code:
DotNetNuke.Common.ApplicationIdentity = System.Security.Principal.WindowsIdentity.GetCurrent()
Commented out the following lines at the end of the method
Code:
Dim oEventController As New EventQueue.EventQueueController
oEventController.ProcessMessages("Application_Start")
In the DotNetNuke.Library in the Globals.vb file
Added the following private member
Code:
Private _ApplicationIdentity As System.Security.Principal.WindowsIdentity
Added the following Property
Code:
Public Property ApplicationIdentity() As System.Security.Principal.WindowsIdentity
Get
Return _ApplicationIdentity
End Get
Set(ByVal value As System.Security.Principal.WindowsIdentity)
_ApplicationIdentity = value
End Set
End Property
In the HttpModule.UrlRewrite module, within the UrlRewriteModule.vb file
Added the following to the OnBeginRequest method
Code:
' Check that the services are running under the current user
If DotNetNuke.Common.ApplicationIdentity.Name <> System.Security.Principal.WindowsIdentity.GetCurrent().Name Then
DotNetNuke.Common.ApplicationIdentity = System.Security.Principal.WindowsIdentity.GetCurrent()
End If
Within the Provider.DNNScheduler module, within the ProcessGroup.vb file
In the Run method change the following
Code:
Try
Process.ScheduleHistoryItem.Succeeded = False
Process.DoWork()
Catch exc As Exception
'in case the scheduler client
'didn't have proper exception handling
'make sure we fire the Errored event
If Not Process Is Nothing Then
Process.ScheduleHistoryItem.Succeeded = False
Process.Errored(exc)
End If
End Try
To this
Code:
Dim changedIdentity As Boolean = False
Dim wi As System.Security.Principal.WindowsImpersonationContext
Try
Process.ScheduleHistoryItem.Succeeded = False
If System.Security.Principal.WindowsIdentity.GetCurrent.Name <> Common.ApplicationIdentity.Name Then
wi = Common.ApplicationIdentity.Impersonate()
changedIdentity = True
End If
Process.DoWork()
If changedIdentity Then
wi.Undo()
End If
Catch exc As Exception
'in case the scheduler client
'didn't have proper exception handling
'make sure we fire the Errored event
If Not Process Is Nothing Then
Process.ScheduleHistoryItem.Succeeded = False
Process.Errored(exc)
End If
If changedIdentity Then
wi.Undo()
End If
End Try
I have also added the follwing SQL to the 04.03.06.SqlDataProvider file
Code:
INSERT INTO {databaseOwner}{objectQualifier}Schedule
(TypeFullName,
TimeLapse,
TimeLapseMeasurement,
RetryTimeLapse,
RetryTimeLapseMeasurement,
RetainHistoryNum,
AttachToEvent,
CatchUpEnabled,
Enabled,
ObjectDependencies)
VALUES
('LeaHosting.DNN.Schedule.EventController.EventControl, LeaHosting.DNN.Schedule.EventController',
1,
'd',
5,
'm',
5,
'APPLICATION_START',
1,
1,
'')
GO
Included in the Source Zip is the schedule that I have wrote to carry out the EventQueue stuff. Please note that this now runs every 24 hours (could not manage to get it to run just the once the way that I wanted).
Now for the standard Warrenty 
There is no Warrenty with any of this code, I have ran and tested this on RedFox Hosting. If you use it, it is at your risk please always test first.
I have now uploaded the files. Please note, I have not tested this on an upgrade.
Bookmarks