I am getting this error with my DNN 4.5 install. Can anyone tell me how to fix this?
Much appreciated!!
Server Error in '/DNN_2' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'Config' is not declared.
Source Error:
|
Line 66:
Line 67: Dim AutoUpgrade As Boolean
Line 68: If Config.GetSetting("AutoUpgrade") Is Nothing Then
Line 69: AutoUpgrade = True
Line 70: Else
|
Source File: C:\DNN_2\Website\App_Code\Global.asax.vb Line: 68
Show Detailed Compiler Output:
C:\WINDOWS\system32> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\24cb482c\0e327a89_8581c701\DotNetNuke.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\1cae47f3\c204a690_8581c701\DotNetNuke.HttpModules.Authentication.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\272809c5\e4f400a6_8581c701\DotNetNuke.WebControls.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\df2438d9\52dd4f83_8581c701\DotNetNuke.Authentication.ADSI.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\310f5f8b\705ffa97_8581c701\DotNetNuke.HttpModules.UsersOnline.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\565941f4\a0efc8a9_8581c701\Microsoft.ApplicationBlocks.Data.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\71f8c98e\224ac585_8581c701\DotNetNuke.Caching.BroadcastPollingCachingProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\5081a680\dcd2dc80_8581c701\CountryListBox.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\74f12ade\ba2589a3_8581c701\DotNetNuke.SolpartMenuNavigationProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\dc36b320\9808fd8c_8581c701\DotNetNuke.DNNScheduler.SqlDataProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\142ee55a\08a9bf96_8581c701\DotNetNuke.HttpModules.UrlRewrite.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\6be316cd\427978ab_8581c701\System.Web.Extensions.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\bef0c5db\f605e18e_8581c701\DotNetNuke.DNNTreeNavigationProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\30d29189\14f68c84_8581c701\DotNetNuke.Authentication.ADSIProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\d5f72745\847489a8_8581c701\DotNetNuke.XMLLoggingProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\70e7a70b\867089a0_8581c701\DotNetNuke.Search.DataStore.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\905a11a9\d058de91_8581c701\DotNetNuke.HttpModules.Compression.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\b310a24b\ec004f94_8581c701\DotNetNuke.HttpModules.Exception.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\b50e3604\b8fc57aa_8581c701\SharpZipLib.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\a788c642\fea32d9c_8581c701\DotNetNuke.Provider.DBLoggingProvider.SqlDataProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\853d9bda\c879c1a4_8581c701\DotNetNuke.SqlDataProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\40b7a4ed\1818028a_8581c701\DotNetNuke.DNNDropDownNavigationProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\57b65d3e\a218faa2_8581c701\DotNetNuke.Services.Syndication.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\9467ff4c\266c3a8b_8581c701\DotNetNuke.DNNMenuNavigationProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\cd87571c\7eb33299_8581c701\DotNetNuke.Membership.Dataprovider.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\2e348ade\b81e1e90_8581c701\DotNetNuke.FckHtmlEditorProvider.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\App_GlobalResources.a4jnimzc.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\31e13204\5ca1119e_8581c701\DotNetNuke.Provider.DNNProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\81bc6145\fa548795_8581c701\DotNetNuke.HttpModules.Personalization.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\83876400\94c4c1a1_8581c701\DotNetNuke.Search.Index.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\887ba83c\483d8ba6_8581c701\DotNetNuke.WebUtility.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\663f56fe\8c076b9a_8581c701\DotNetNuke.Provider.AspNetProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\799c9d89\ea261582_8581c701\DotNetNuke.ASP2MenuNavigationProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\1011f3bc\3ef23588_8581c701\DotNetNuke.Caching.FileBasedCachingProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\fe331e38\76a7e4aa_8581c701\SolpartWebControls.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\322d49ca\781c519f_8581c701\DotNetNuke.Provider.Membership.SqlDataProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\ee460ac4\deac1693_8581c701\DotNetNuke.HttpModules.DNNMembership.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\3f7e73cb\9a5ba39b_8581c701\DotNetNuke.Provider.DBLoggingProvider.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\2646cd73\34c0728c_8581c701\DotNetNuke.DNNScheduler.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\assembly\dl3\06f6a803\86924f86_8581c701\DotNetNuke.Caching.BroadcastPollingCachingProvider.SQLDataProvider.DLL" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\App_Code.tsxgx7kx.dll" /debug- /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\App_Code.tsxgx7kx.0.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\App_Code.tsxgx7kx.1.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dnn_2\a4af9a26\fbe67865\App_Code.tsxgx7kx.2.vb"
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
C:\DNN_2\Website\App_Code\Global.asax.vb(68) : error BC30451: Name 'Config' is not declared.
If Config.GetSetting("AutoUpgrade") Is Nothing Then
~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(71) : error BC30451: Name 'Config' is not declared.
AutoUpgrade = Boolean.Parse(Config.GetSetting("AutoUpgrade"))
~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(75) : error BC30451: Name 'Config' is not declared.
If Config.GetSetting("UseInstallWizard") Is Nothing Then
~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(78) : error BC30451: Name 'Config' is not declared.
UseWizard = Boolean.Parse(Config.GetSetting("UseInstallWizard"))
~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(142) : error BC30451: Name 'LogException' is not declared.
LogException(exc)
~~~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(166) : error BC30002: Type 'PortalController' is not defined.
Dim objPortalController As New PortalController
~~~~~~~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(170) : error BC30002: Type 'PortalInfo' is not defined.
Dim objPortalInfo As PortalInfo = CType(arrPortals(i), PortalInfo)
~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(188) : error BC30451: Name 'Scheduling' is not declared.
Scheduling.SchedulingProvider.Instance.Halt("Stopped by Application_End")
~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(226) : error BC30451: Name 'Scheduling' is not declared.
If Services.Scheduling.SchedulingProvider.SchedulerMode = Scheduling.SchedulerMode.TIMER_METHOD Then
~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(227) : error BC30002: Type 'Scheduling.SchedulingProvider' is not defined.
Dim scheduler As Scheduling.SchedulingProvider = Scheduling.SchedulingProvider.Instance()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(228) : error BC30451: Name 'Scheduling' is not declared.
scheduler.RunEventSchedule(Scheduling.EventName.APPLICATION_START)
~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(229) : error BC30451: Name 'Scheduling' is not declared.
Dim newThread As New Threading.Thread(AddressOf Scheduling.SchedulingProvider.Instance.Start)
~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(261) : error BC30451: Name 'Config' is not declared.
If Config.GetSetting("InstallationSubfolder") = "" Then
~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(264) : error BC30451: Name 'Config' is not declared.
ApplicationPath = Config.GetSetting("InstallationSubfolder") & "/"
~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(293) : error BC30451: Name 'EventQueue' is not declared.
EventQueue.EventQueueController.ProcessMessages("Application_Start")
~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(340) : error BC30451: Name 'Scheduling' is not declared.
If Services.Scheduling.SchedulingProvider.SchedulerMode = Scheduling.SchedulerMode.REQUEST_METHOD _
~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(343) : error BC30002: Type 'Scheduling.SchedulingProvider' is not defined.
Dim scheduler As Scheduling.SchedulingProvider = Scheduling.SchedulingProvider.Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\DNN_2\Website\App_Code\Global.asax.vb(354) : error BC30451: Name 'LogException' is not declared.
LogException(exc)
~~~~~~~~~~~~
|
Show Complete Compilation Source:
Line 1: '
Line 2: ' DotNetNuke® - http://www.dotnetnuke.com
Line 3: ' Copyright (c) 2002-2007
Line 4: ' by DotNetNuke Corporation
Line 5: '
Line 6: ' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
Line 7: ' documentation files (the "Software"), to deal in the Software without restriction, including without limitation
Line 8: ' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
Line 9: ' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Line 10: '
Line 11: ' The above copyright notice and this permission notice shall be included in all copies or substantial portions
Line 12: ' of the Software.
Line 13: '
Line 14: ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
Line 15: ' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
Line 16: ' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
Line 17: ' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
Line 18: ' DEALINGS IN THE SOFTWARE.
Line 19: '
Line 20: Imports System.Security
Line 21: Imports System.Security.Principal
Line 22: Imports System.Threading
Line 23: Imports System.Web.Security
Line 24: Imports System.IO
Line 25:
Line 26: Imports DotNetNuke.Security.Roles
Line 27: Imports DotNetNuke.Services.Log.EventLog
Line 28: Imports DotNetNuke.Services.Upgrade
Line 29:
Line 30:
Line 31: Namespace DotNetNuke.Common
Line 32:
Line 33: ''' -----------------------------------------------------------------------------
Line 34: ''' Project : DotNetNuke
Line 35: ''' Class : Global
Line 36: '''
Line 37: ''' -----------------------------------------------------------------------------
Line 38: ''' <summary>
Line 39: '''
Line 40: ''' </summary>
Line 41: ''' <remarks>
Line 42: ''' </remarks>
Line 43: ''' <history>
Line 44: ''' [sun1] 1/18/2004 Created
Line 45: ''' </history>
Line 46: ''' -----------------------------------------------------------------------------
Line 47: Public Class [Global]
Line 48: Inherits System.Web.HttpApplication
Line 49:
Line 50: #Region "Private Methods"
Line 51:
Line 52: ''' -----------------------------------------------------------------------------
Line 53: ''' <summary>
Line 54: ''' CheckVersion determines whether the App is synchronized with the DB
Line 55: ''' </summary>
Line 56: ''' <remarks>
Line 57: ''' </remarks>
Line 58: ''' <history>
Line 59: ''' [cnurse] 2/17/2005 created
Line 60: ''' </history>
Line 61: ''' -----------------------------------------------------------------------------
Line 62: Private Sub CheckVersion()
Line 63: Dim Server As HttpServerUtility = HttpContext.Current.Server
Line 64: Dim Request As HttpRequest = HttpContext.Current.Request
Line 65: Dim Response As HttpResponse = HttpContext.Current.Response
Line 66:
Line 67: Dim AutoUpgrade As Boolean
Line 68: If Config.GetSetting("AutoUpgrade") Is Nothing Then
Line 69: AutoUpgrade = True
Line 70: Else
Line 71: AutoUpgrade = Boolean.Parse(Config.GetSetting("AutoUpgrade"))
Line 72: End If
Line 73:
Line 74: Dim UseWizard As Boolean
Line 75: If Config.GetSetting("UseInstallWizard") Is Nothing Then
Line 76: UseWizard = True
Line 77: Else
Line 78: UseWizard = Boolean.Parse(Config.GetSetting("UseInstallWizard"))
Line 79: End If
Line 80:
Line 81: 'Determine the Upgrade status and redirect to Install.aspx
Line 82: Select Case GetUpgradeStatus()
Line 83: Case Globals.UpgradeStatus.Install
Line 84: If AutoUpgrade Then
Line 85: If UseWizard Then
Line 86: Response.Redirect("~/Install/InstallWizard.aspx")
Line 87: Else
Line 88: Response.Redirect("~/Install/Install.aspx?mode=install")
Line 89: End If
Line 90: Else
Line 91: CreateUnderConstructionPage()
Line 92: Response.Redirect("~/Install/UnderConstruction.htm")
Line 93: End If
Line 94: Case Globals.UpgradeStatus.Upgrade
Line 95: If AutoUpgrade Then
Line 96: Response.Redirect("~/Install/Install.aspx?mode=upgrade")
Line 97: Else
Line 98: CreateUnderConstructionPage()
Line 99: Response.Redirect("~/Install/UnderConstruction.htm")
Line 100: End If
Line 101: Case Globals.UpgradeStatus.Error
Line 102: If AutoUpgrade Then
Line 103: If UseWizard Then
Line 104: Response.Redirect("~/Install/InstallWizard.aspx")
Line 105: Else
Line 106: Response.Redirect("~/Install/Install.aspx?mode=none")
Line 107: End If
Line 108: Else
Line 109: CreateUnderConstructionPage()
Line 110: Response.Redirect("~/Install/UnderConstruction.htm")
Line 111: End If
Line 112: End Select
Line 113: End Sub
Line 114:
Line 115: Private Sub CreateUnderConstructionPage()
Line 116: ' create an UnderConstruction page if it does not exist already
Line 117: If Not File.Exists(System.Web.HttpContext.Current.Server.MapPath("~/Install/UnderConstruction.htm")) Then
Line 118: If File.Exists(System.Web.HttpContext.Current.Server.MapPath("~/Install/UnderConstruction.template.htm")) Then
Line 119: File.Copy(System.Web.HttpContext.Current.Server.MapPath("~/Install/UnderConstruction.template.htm"), System.Web.HttpContext.Current.Server.MapPath("~/Install/UnderConstruction.htm"))
Line 120: End If
Line 121: End If
Line 122: End Sub
Line 123:
Line 124: ''' -----------------------------------------------------------------------------
Line 125: ''' <summary>
Line 126: ''' LogEnd logs the Application Start Event
Line 127: ''' </summary>
Line 128: ''' <remarks>
Line 129: ''' </remarks>
Line 130: ''' <history>
Line 131: ''' [cnurse] 1/28/2005 Moved back to App_End from Logging Module
Line 132: ''' </history>
Line 133: ''' -----------------------------------------------------------------------------
Line 134: Private Sub LogEnd()
Line 135: Try
Line 136: Dim objEv As New EventLogController
Line 137: Dim objEventLogInfo As New LogInfo
Line 138: objEventLogInfo.BypassBuffering = True
Line 139: objEventLogInfo.LogTypeKey = Services.Log.EventLog.EventLogController.EventLogType.APPLICATION_SHUTTING_DOWN.ToString
Line 140: objEv.AddLog(objEventLogInfo)
Line 141: Catch exc As Exception
Line 142: LogException(exc)
Line 143: End Try
Line 144:
Line 145: ' purge log buffer
Line 146: LoggingProvider.Instance.PurgeLogBuffer()
Line 147: End Sub
Line 148:
Line 149: ''' -----------------------------------------------------------------------------
Line 150: ''' <summary>
Line 151: ''' CacheMappedDirectory caches the Portal Mapped Directory(s)
Line 152: ''' </summary>
Line 153: ''' <remarks>
Line 154: ''' </remarks>
Line 155: ''' <history>
Line 156: ''' [cnurse] 1/27/2005 Moved back to App_Start from Caching Module
Line 157: ''' </history>
Line 158: ''' -----------------------------------------------------------------------------
Line 159: Private Sub CacheMappedDirectory()
Line 160: 'Cache the mapped physical home directory for each portal
Line 161: 'so the mapped directories are available outside
Line 162: 'of httpcontext. This is especially necessary
Line 163: 'when the /Portals or portal home directory has been
Line 164: 'mapped in IIS to another directory or server.
Line 165: Dim objFolderController As New Services.FileSystem.FolderController
Line 166: Dim objPortalController As New PortalController
Line 167: Dim arrPortals As ArrayList = objPortalController.GetPortals()
Line 168: Dim i As Integer
Line 169: For i = 0 To arrPortals.Count - 1
Line 170: Dim objPortalInfo As PortalInfo = CType(arrPortals(i), PortalInfo)
Line 171: objFolderController.SetMappedDirectory(objPortalInfo, HttpContext.Current)
Line 172: Next
Line 173:
Line 174: End Sub
Line 175:
Line 176: ''' -----------------------------------------------------------------------------
Line 177: ''' <summary>
Line 178: ''' StopScheduler stops the Scheduler
Line 179: ''' </summary>
Line 180: ''' <remarks>
Line 181: ''' </remarks>
Line 182: ''' <history>
Line 183: ''' [cnurse] 1/28/2005 Moved back to App_End from Scheduling Module
Line 184: ''' </history>
Line 185: ''' -----------------------------------------------------------------------------
Line 186: Private Sub StopScheduler()
Line 187: ' stop scheduled jobs
Line 188: Scheduling.SchedulingProvider.Instance.Halt("Stopped by Application_End")
Line 189: End Sub
Line 190:
Line 191: #End Region
Line 192:
Line 193: #Region "Public Methods"
Line 194:
Line 195: ''' -----------------------------------------------------------------------------
Line 196: ''' <summary>
Line 197: ''' LogStart logs the Application Start Event
Line 198: ''' </summary>
Line 199: ''' <remarks>
Line 200: ''' </remarks>
Line 201: ''' <history>
Line 202: ''' [cnurse] 1/27/2005 Moved back to App_Start from Logging Module
Line 203: ''' </history>
Line 204: ''' -----------------------------------------------------------------------------
Line 205: Public Shared Sub LogStart()
Line 206: Dim objEv As New EventLogController
Line 207: Dim objEventLogInfo As New LogInfo
Line 208: objEventLogInfo.BypassBuffering = True
Line 209: objEventLogInfo.LogTypeKey = Services.Log.EventLog.EventLogController.EventLogType.APPLICATION_START.ToString
Line 210: objEv.AddLog(objEventLogInfo)
Line 211:
Line 212: End Sub
Line 213:
Line 214: ''' -----------------------------------------------------------------------------
Line 215: ''' <summary>
Line 216: ''' StartScheduler starts the Scheduler
Line 217: ''' </summary>
Line 218: ''' <remarks>
Line 219: ''' </remarks>
Line 220: ''' <history>
Line 221: ''' [cnurse] 1/27/2005 Moved back to App_Start from Scheduling Module
Line 222: ''' </history>
Line 223: ''' -----------------------------------------------------------------------------
Line 224: Public Shared Sub StartScheduler()
Line 225: ' instantiate APPLICATION_START scheduled jobs
Line 226: If Services.Scheduling.SchedulingProvider.SchedulerMode = Scheduling.SchedulerMode.TIMER_METHOD Then
Line 227: Dim scheduler As Scheduling.SchedulingProvider = Scheduling.SchedulingProvider.Instance()
Line 228: scheduler.RunEventSchedule(Scheduling.EventName.APPLICATION_START)
Line 229: Dim newThread As New Threading.Thread(AddressOf Scheduling.SchedulingProvider.Instance.Start)
Line 230: newThread.IsBackground = True
Line 231: newThread.Start()
Line 232: End If
Line 233: End Sub
Line 234:
Line 235: #End Region
Line 236:
Line 237: #Region "Application Event Handlers"
Line 238:
Line 239: ''' -----------------------------------------------------------------------------
Line 240: ''' <summary>
Line 241: ''' Application_Start
Line 242: ''' Executes on the first web request into the portal application,
Line 243: ''' when a new DLL is deployed, or when web.config is modified.
Line 244: ''' </summary>
Line 245: ''' <param name="Sender"></param>
Line 246: ''' <param name="E"></param>
Line 247: ''' <remarks>
Line 248: ''' - global variable initialization
Line 249: ''' </remarks>
Line 250: ''' <history>
Line 251: ''' </history>
Line 252: ''' -----------------------------------------------------------------------------
Line 253: Private Sub Application_Start(ByVal Sender As Object, ByVal E As EventArgs)
Line 254:
Line 255: Dim Server As HttpServerUtility = HttpContext.Current.Server
Line 256:
Line 257: 'global variable initialization
Line 258: ServerName = Server.MachineName
Line 259:
Line 260: If HttpContext.Current.Request.ApplicationPath = "/" Then
Line 261: If Config.GetSetting("InstallationSubfolder") = "" Then
Line 262: ApplicationPath = ""
Line 263: Else
Line 264: ApplicationPath = Config.GetSetting("InstallationSubfolder") & "/"
Line 265: End If
Line 266: Else
Line 267: ApplicationPath = HttpContext.Current.Request.ApplicationPath
Line 268: End If
Line 269: ApplicationMapPath = System.AppDomain.CurrentDomain.BaseDirectory.Substring(0, System.AppDomain.CurrentDomain.BaseDirectory.Length - 1)
Line 270: ApplicationMapPath = ApplicationMapPath.Replace("/", "\")
Line 271:
Line 272: HostPath = ApplicationPath & "/Portals/_default/"
Line 273: HostMapPath = Server.MapPath(HostPath)
Line 274:
Line 275: 'First check if we are installing
Line 276: If HttpContext.Current.Request.Url.LocalPath.EndsWith("InstallWizard.aspx") Then
Line 277: Exit Sub
Line 278: End If
Line 279:
Line 280: 'Check whether the current App Version is the same as the DB Version
Line 281: CheckVersion()
Line 282:
Line 283: 'Cache Mapped Directory(s)
Line 284: CacheMappedDirectory()
Line 285:
Line 286: 'log APPLICATION_START event
Line 287: LogStart()
Line 288:
Line 289: 'Start Scheduler
Line 290: StartScheduler()
Line 291:
Line 292: 'Process any messages in the EventQueue for the Application_Start event
Line 293: EventQueue.EventQueueController.ProcessMessages("Application_Start")
Line 294:
Line 295: End Sub
Line 296:
Line 297: ''' -----------------------------------------------------------------------------
Line 298: ''' <summary>
Line 299: ''' Application_End
Line 300: ''' Executes when the Application times out
Line 301: ''' </summary>
Line 302: ''' <param name="Sender"></param>
Line 303: ''' <param name="E"></param>
Line 304: ''' <remarks>
Line 305: ''' </remarks>
Line 306: ''' <history>
Line 307: ''' </history>
Line 308: ''' -----------------------------------------------------------------------------
Line 309: Private Sub Application_End(ByVal Sender As Object, ByVal E As EventArgs)
Line 310:
Line 311: ' log APPLICATION_END event
Line 312: LogEnd()
Line 313:
Line 314: ' stop scheduled jobs
Line 315: StopScheduler()
Line 316:
Line 317: End Sub
Line 318:
Line 319: ''' -----------------------------------------------------------------------------
Line 320: ''' <summary>
Line 321: ''' Application_BeginRequest
Line 322: ''' Executes when the request is initiated
Line 323: ''' </summary>
Line 324: ''' <param name="Sender"></param>
Line 325: ''' <param name="E"></param>
Line 326: ''' <remarks>
Line 327: ''' </remarks>
Line 328: ''' <history>
Line 329: ''' </history>
Line 330: ''' -----------------------------------------------------------------------------
Line 331: Private Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Line 332:
Line 333: 'First check if we are upgrading/installing
Line 334: If Request.Url.LocalPath.ToLower.EndsWith("install.aspx") OrElse Request.Url.LocalPath.ToLower.EndsWith("installwizard.aspx") Then
Line 335: Exit Sub
Line 336: End If
Line 337:
Line 338: Try
Line 339:
Line 340: If Services.Scheduling.SchedulingProvider.SchedulerMode = Scheduling.SchedulerMode.REQUEST_METHOD _
Line 341: AndAlso Services.Scheduling.SchedulingProvider.ReadyForPoll Then
Line 342:
Line 343: Dim scheduler As Scheduling.SchedulingProvider = Scheduling.SchedulingProvider.Instance
Line 344: Dim RequestScheduleThread As Threading.Thread
Line 345: RequestScheduleThread = New Threading.Thread(AddressOf scheduler.ExecuteTasks)
Line 346: RequestScheduleThread.IsBackground = True
Line 347: RequestScheduleThread.Start()
Line 348:
Line 349: Services.Scheduling.SchedulingProvider.ScheduleLastPolled = Now
Line 350:
Line 351: End If
Line 352:
Line 353: Catch exc As Exception
Line 354: LogException(exc)
Line 355: End Try
Line 356:
Line 357: End Sub
Line 358:
Line 359: #End Region
Line 360:
Line 361: End Class
Line 362:
Line 363: End Namespace
Line 364:
|