Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...4.4.0 upgrade return the code4.4.0 upgrade return the code
Previous
 
Next
New Post
12/29/2006 4:55 AM
 

Hi,

I try to upgrade from 4.3.7 to 4.4.0. I've upgraded DotNetNuke many times before, and even the 4.4.0 on a different server, but on this server a strange error occured. I point out that this server never had any trouble before.

Obviously DNN manage to find out that an upgrade is due, but the install.aspx "fails" and instead it return the code itself. 

This is how Internet Explorer displays install/install.aspx:

'
' DotNetNuke - http://www.dotnetnuke.com
' Copyright (c) 2002-2006
' by DotNetNuke Corporation
'
' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
' documentation files (the "Software"), to deal in the Software without restriction, including without limitation
' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in all copies or substantial portions
' of the Software.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
' DEALINGS IN THE SOFTWARE.
'

Imports System.IO
Imports System.xml

Imports DotNetNuke.Common
Imports DotNetNuke.Framework.Providers
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Modules.Admin.ResourceInstaller
Imports DotNetNuke.Services.Upgrade

Namespace DotNetNuke.Framework

    Partial  Class Install
        Inherits System.Web.UI.Page

#Region "Private Methods"

        Private Sub ExecuteScripts()

            'Start Timer
            Services.Upgrade.Upgrade.StartTimer()

            'Write out Header
            HtmlUtils.WriteHeader(Response, "executeScripts")

            Response.Write("<h2>Execute Scripts Status Report</h2>")
            Response.Flush()

            Dim strProviderPath As String = PortalSettings.GetProviderPath()
            If Not strProviderPath.StartsWith("ERROR:") Then
                Services.Upgrade.Upgrade.ExecuteScripts(strProviderPath)
            End If

            Response.Write("<h2>Execution Complete</h2>")
            Response.Flush()


            'Write out Footer
            HtmlUtils.WriteFooter(Response)
        End Sub

        Private Sub InstallApplication()

            ' the application uses a two step installation process. The first step is used to update
            ' the Web.config with any configuration settings - which forces an application restart.
            ' The second step finishes the installation process and provisions the site.

            Dim installationDate As String = Config.GetSetting("InstallationDate")
            Dim backupFolder As String = glbConfigFolder & "Backup_" & Now.Year.ToString & Now.Month.ToString & Now.Day.ToString & Now.Hour.ToString & Now.Minute.ToString & "\"

            If installationDate Is Nothing Or installationDate = "" Then
                Dim xmlConfig As New XmlDocument
                Dim strError As String = ""

                'save the current config files
                Try
                    If Not Directory.Exists(ApplicationMapPath & backupFolder) Then
                        Directory.CreateDirectory(ApplicationMapPath & backupFolder)
                    End If

                    If File.Exists(ApplicationMapPath & "\web.config") Then
                        File.Copy(ApplicationMapPath & "\web.config", ApplicationMapPath & backupFolder & "web_old.config", True)
                    End If
                Catch ex As Exception
                    'Error backing up old web.config
                    'This error is not critical, so can be ignored
                End Try

                Try
                    ' open the web.config
                    xmlConfig = Config.Load()

                    ' create random keys for the Membership machine keys
                    xmlConfig = Config.UpdateMachineKey(xmlConfig)
                Catch ex As Exception
                    strError += ex.Message
                End Try

                ' save a copy of the web.config
                strError += Config.Save(xmlConfig, backupFolder & "web_.config")

                ' save the web.config
                strError += Config.Save(xmlConfig)

                If strError = "" Then
                    ' send a new request to the application to initiate step 2
                    Response.Redirect(HttpContext.Current.Request.RawUrl, True)
                Else
                    ' error saving web.config
                    Dim objStreamReader As StreamReader
                    objStreamReader = File.OpenText(HttpContext.Current.Server.MapPath("~/403-3.htm"))
                    Dim strHTML As String = objStreamReader.ReadToEnd
                    objStreamReader.Close()
                    strHTML = Replace(strHTML, "[MESSAGE]", strError)
                    HttpContext.Current.Response.Write(strHTML)
                    HttpContext.Current.Response.End()
                End If
            Else
                'Start Timer
                Services.Upgrade.Upgrade.StartTimer()

                'Write out Header
                HtmlUtils.WriteHeader(Response, "install")

                ' get path to script files
                Dim strProviderPath As String = PortalSettings.GetProviderPath()
                If Not strProviderPath.StartsWith("ERROR:") Then

                    Response.Write("<h2>Version: " & glbAppVersion & "</h2>")
                    Response.Flush()

                    Response.Write("<br><br>")
                    Response.Write("<h2>Installation Status Report</h2>")
                    Response.Flush()
                    Services.Upgrade.Upgrade.InstallDNN(strProviderPath)

                    Response.Write("<h2>Installation Complete</h2>")
                    Response.Write("<br><br><h2><a href='../Default.aspx'>Click Here To Access Your Portal</a></h2><br><br>")
                    Response.Flush()
                Else
                    ' upgrade error
                    Response.Write("<h2>Upgrade Error: " & strProviderPath & "</h2>")
                    Response.Flush()
                End If

                'Write out Footer
                HtmlUtils.WriteFooter(Response)

                'log APPLICATION_START event
                DotNetNuke.Common.Global.LogStart()

                'Start Scheduler
                DotNetNuke.Common.Global.StartScheduler()
            End If

        End Sub

        Private Sub UpgradeApplication()

            'Start Timer
            Services.Upgrade.Upgrade.StartTimer()

            'Write out Header
            HtmlUtils.WriteHeader(Response, "upgrade")

            Response.Write("<h2>Current Assembly Version: " & glbAppVersion & "</h2>")
            Response.Flush()

            ' get path to script files
            Dim strProviderPath As String = PortalSettings.GetProviderPath()
            If Not strProviderPath.StartsWith("ERROR:") Then
                Dim strDatabaseVersion As String

                ' get current database version
                Dim dr As IDataReader = PortalSettings.GetDatabaseVersion
                If dr.Read Then
                    'Call Upgrade with the current DB Version to upgrade an
                    'existing DNN installation
                    Dim majVersion As Integer = Convert.ToInt32(dr("Major"))
                    Dim minVersion As Integer = Convert.ToInt32(dr("Minor"))
                    Dim buildVersion As Integer = Convert.ToInt32(dr("Build"))
                    strDatabaseVersion = Format(majVersion, "00") & "." & Format(minVersion, "00") & "." & Format(buildVersion, "00")

                    Response.Write("<h2>Current Database Version: " & strDatabaseVersion & "</h2>")
                    Response.Flush()

                    Dim ignoreWarning As String = Null.NullString
                    Dim strWarning As String = Null.NullString
                    If (majVersion = 3 And minVersion < 3) Or (majVersion = 4 And minVersion < 3) Then
                        'Users and profile have not been transferred

                        ' Get the name of the data provider
                        Dim objProviderConfiguration As ProviderConfiguration = ProviderConfiguration.GetProviderConfiguration("data")

                        'Execute Special Script
                        Upgrade.ExecuteScript(strProviderPath + "Upgrade." + objProviderConfiguration.DefaultProvider)

                        If Not (Request.QueryString("ignoreWarning") Is Nothing) Then
                            ignoreWarning = Request.QueryString("ignoreWarning").ToLower
                        End If

                        strWarning = Upgrade.CheckUpgrade()
                    Else
                        ignoreWarning = "true"
                    End If

                    'Check whether Upgrade is ok
                    If strWarning = Null.NullString Or ignoreWarning = "true" Then
                        Response.Write("<br><br>")
                        Response.Write("<h2>Upgrade Status Report</h2>")
                        Response.Flush()
                        Upgrade.UpgradeDNN(strProviderPath, strDatabaseVersion.Replace(".", ""))

                        'Install Resources
                        Dim objResourceInstaller As New ResourceInstaller
                        objResourceInstaller.Install(True, 0)

                        Response.Write("<h2>Upgrade Complete</h2>")
                        Response.Write("<br><br><h2><a href='../Default.aspx'>Click Here To Access Your Portal</a></h2><br><br>")
                    Else
                        Response.Write("<h2>Warning:</h2>" & strWarning.Replace(vbCrLf, "<br />"))

                        Response.Write("<br><br><a href='Install.aspx?mode=Install&ignoreWarning=true'>Click Here To Proceed With The Upgrade.</a>")

                    End If
                    Response.Flush()
                End If
                dr.Close()
            Else
                Response.Write("<h2>Upgrade Error: " & strProviderPath & "</h2>")
                Response.Flush()
            End If

            'Write out Footer
            HtmlUtils.WriteFooter(Response)
        End Sub

        Private Sub AddPortal()

            'Start Timer
            Services.Upgrade.Upgrade.StartTimer()

            'Write out Header
            HtmlUtils.WriteHeader(Response, "addPortal")

            Response.Write("<h2>Add Portal Status Report</h2>")
            Response.Flush()

            ' install new portal(s)
            Dim strNewFile As String = Common.Globals.ApplicationMapPath & "\Install\Portal\Portals.resources"
            If File.Exists(strNewFile) Then
                Dim xmlDoc As New XmlDocument
                Dim node As XmlNode
                Dim nodes As XmlNodeList
                Dim intPortalId As Integer
                xmlDoc.Load(strNewFile)

                ' parse portal(s) if available
                nodes = xmlDoc.SelectNodes("//dotnetnuke/portals/portal")
                For Each node In nodes
                    If Not node Is Nothing Then
                        intPortalId = Services.Upgrade.Upgrade.AddPortal(node, True, 0)
                    End If
                Next

                ' delete the file
                Try
                    File.SetAttributes(strNewFile, FileAttributes.Normal)
                    File.Delete(strNewFile)
                Catch
                    ' error removing the file
                End Try

                Response.Write("<h2>Installation Complete</h2>")
                Response.Write("<br><br><h2><a href='../Default.aspx'>Click Here To Access Your Portal</a></h2><br><br>")
                Response.Flush()
            End If


            'Write out Footer
            HtmlUtils.WriteFooter(Response)
        End Sub

        Private Sub InstallResources()

            'Start Timer
            Services.Upgrade.Upgrade.StartTimer()

            'Write out Header
            HtmlUtils.WriteHeader(Response, "installResources")

            Response.Write("<h2>Install Resources Status Report</h2>")
            Response.Flush()

            ' install new resources(s)
            Dim objResourceInstaller As New ResourceInstaller
            objResourceInstaller.Install(True, 0)

            Response.Write("<h2>Installation Complete</h2>")
            Response.Flush()


            'Write out Footer
            HtmlUtils.WriteFooter(Response)
        End Sub

        Private Sub NoUpgrade()
            ' get path to script files
            Dim strProviderPath As String = PortalSettings.GetProviderPath()
            If Not strProviderPath.StartsWith("ERROR:") Then
                Dim strDatabaseVersion As String
                ' get current database version
                Try
                    Dim dr As IDataReader = PortalSettings.GetDatabaseVersion
                    If dr.Read Then
                        'Write out Header
                        HtmlUtils.WriteHeader(Response, "none")
                        Response.Write("<h2>Current Assembly Version: " & glbAppVersion & "</h2>")

                        'Call Upgrade with the current DB Version to upgrade an
                        'existing DNN installation
                        strDatabaseVersion = Format(dr("Major"), "00") & "." & Format(dr("Minor"), "00") & "." & Format(dr("Build"), "00")

                        Response.Write("<h2>Current Database Version: " & strDatabaseVersion & "</h2>")

                        Response.Write("<br><br><a href='Install.aspx?mode=Install'>Click Here To Upgrade DotNetNuke</a>")
                        Response.Flush()
                    Else
                        'Write out Header
                        HtmlUtils.WriteHeader(Response, "noDBVersion")
                        Response.Write("<h2>Current Assembly Version: " & glbAppVersion & "</h2>")

                        Response.Write("<h2>Current Database Version: N/A</h2>")
                        Response.Write("<br><br><h2><a href='Install.aspx?mode=Install'>Click Here To Install DotNetNuke</a></h2>")
                        Response.Flush()
                    End If
                    dr.Close()
                Catch ex As Exception
                    'Write out Header
                    HtmlUtils.WriteHeader(Response, "error")
                    Response.Write("<h2>Current Assembly Version: " & glbAppVersion & "</h2>")

                    Response.Write("<h2>" & ex.Message & "</h2>")
                    Response.Flush()
                End Try
            Else
                'Write out Header
                HtmlUtils.WriteHeader(Response, "error")
                Response.Write("<h2>Current Assembly Version: " & glbAppVersion & "</h2>")

                Response.Write("<h2>" & strProviderPath & "</h2>")
                Response.Flush()
            End If
            'Write out Footer
            HtmlUtils.WriteFooter(Response)
        End Sub
#End Region

#Region "Event Handlers"

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            'Get current Script time-out
            Dim scriptTimeOut As Integer = Server.ScriptTimeout

            Dim mode As String = ""
            If Not (Request.QueryString("mode") Is Nothing) Then
                mode = Request.QueryString("mode").ToLower
            End If

            'Disable Client side caching
            Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache)

            'Check mode is not Nothing
            If mode = "none" Then
                NoUpgrade()
            Else
                'Set Script timeout to MAX value
                Server.ScriptTimeout = Integer.MaxValue

                Select Case GetUpgradeStatus()
                    Case Globals.UpgradeStatus.Install
                        InstallApplication()
                    Case Globals.UpgradeStatus.Upgrade
                        UpgradeApplication()
                    Case Globals.UpgradeStatus.None
                        'Check mode
                        Select Case mode
                            Case "addportal"
                                AddPortal()
                            Case "installresources"
                                InstallResources()
                            Case "executescripts"
                                ExecuteScripts()
                        End Select
                    Case Globals.UpgradeStatus.Error
                        NoUpgrade()
                End Select

                    'restore Script timeout
                    Server.ScriptTimeout = scriptTimeOut
            End If

        End Sub

#End Region

#Region " Web Form Designer Generated Code "

        'This call is required by the Web Form Designer.
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

        End Sub


        Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
            'CODEGEN: This method call is required by the Web Form Designer
            'Do not modify it using the code editor.
            InitializeComponent()
        End Sub

#End Region

    End Class
End Namespace

 

 

Anyone got any clue?

With kind regards,

Steinar Svendsen

 
New Post
12/29/2006 8:12 AM
 

Hi,

After the error above, I have tried to set AutoUpgrade to False and run the keepalive.aspx (just for fun), and IIS then return this error:

 

Server Error in '/' Application.

Email

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: Email

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[IndexOutOfRangeException: Email]
   System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) +1358327
   System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) +102
   System.Data.SqlClient.SqlDataReader.get_Item(String name) +12
   DotNetNuke.Entities.Portals.PortalController.FillPortalInfo(IDataReader dr, Boolean CheckForOpenDataReader) +723
   DotNetNuke.Entities.Portals.PortalController.GetPortal(Int32 PortalId) +190
   DotNetNuke.Entities.Portals.PortalSettings.GetPortalSettings(Int32 TabId, PortalAliasInfo objPortalAliasInfo) +121
   DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabId, PortalAliasInfo objPortalAliasInfo) +83
   DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +5773
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

 


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

 
New Post
12/29/2006 10:31 AM
 

Problem solved. I did the upgrade from a fresh computer, and realized in the middle of the ftp transfer that half of the files failed because of active mode and the firewall. So I had to stop the transfer, and choose Skip if Exist (apply to all files) to get rid of the que and start all over. I then changed the ftp client to use Passive, and uploaded again. This was the start of my mysterious problems.

But after I removed Skip if Exist (apply to all files)  and did a new upload, everything is back to normal :)

With kind regards,

Steinar Svendsen

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...4.4.0 upgrade return the code4.4.0 upgrade return the code


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out