DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Moving to new server

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





New Around Here





    I'm trying to move site to new server (server 2022) but kept sql at 2017, copied dnn directory and restored database, set permission on folder to IISAPPPOOL\sitename

    webconfig use:   <add name="SiteSqlServer" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Oasis;Integrated Security=True" providerName="System.Data.SqlClient" />
    error Can't find: Requested URL: /Install/InstallWizard.aspx
    comment: don't want install - moving old site

    webconfig use:  <add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Oasis.mdf;" providerName="System.Data.SqlClient"/>
    error: Connection To The Database Failed

    Database has IISAPPPOOL\sitename and set as dbowner
    Used udl to test db connection, OK and SSMS has no problems
    DNN 9.2.2 - Wanted to export but that doesn't work in 9.2.2
    Using dnndev.me to test

    Can DNN 9.2.2 run on Server 2022. How do I solve db connection error?






    New Around Here





      I too am looking to move the IIS only part (from Windows Server 2008 R2 to Windows Server 2022).

      Currently running DNN 9.10.02 (0)

       






      Veteran Member





        did you create a SQL Server account for IISAPPPOOL\appPoolName (IIS AppPoolName is by default same as IIS website name)?

        you also need to grant at least full modify permission to it for your database (or dbowner permission) 






        Veteran Member





          To correct some typos in Sebastian's post: The application pool identity is "IIS AppPool\AppPoolName" (mind the space between IIS and AppPool). Use Integrated Security to connect. If IIS and SQL Server are not running on the same machine but in the same Windows Domain, then you have to use "DOMAIN\ServerName$" for the login and database user, and mind the firewall rules. If they are on different Windows Domains or not domain members (e.g. in a DMZ), then you have to use an SQL Server login.

          db_owner is a bit much for the daily operation of a DNN website (although you need this for installing/upgrading DNN or extensions), but db_datareader and db_datawriter is too less. Read more here: Secure your DNN Database by some simple steps (dnncommunity.org).

          Happy DNNing!
          Michael

          Michael Tobisch
          DNN★MVP

          dnnWerk Austria
          DNN Connect





          New Around Here





            I finally fixed this.
            The error "Can't find: Requested URL: /Install/InstallWizard.aspx" means that DNN can't read web.config. Wish I had kept URL that explained this and probable source of error.
            On live site DNN web.config redirects autodiscover to mail server. On test site, not necessary but did not remove xml from web.config. After removing that line, everything worked.
            Difficult to troubleshhot as web.config was valid xml but DNN doesn't 'understand' or skip xml it doesn't understand. The cryptic error message did not help.
            Thank you Sebastian and Michael for suggestions.
            Will try to upgrade to DNN v9.10.2 (Using Suggested Upgrade Path) and then upgrade SQL Express to 2019.
            If everything works, will take site live and let you know.






            New Around Here





              Trying to upgrade from 9.2.2 to 9.3.2

              "progress":58,"details":"ERROR occured - Installing Library - DNNCE_SiteExportImport_09.03.02_Install.zip","check0":"Done","check1":"Retry Errors 1"

              2022-03-28 17:13:36,054 [s311074][Thread:19][ERROR] DotNetNuke.Data.SqlDataProvider - System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'oa_Export_GetActiveTabModules' in the database.
                 at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
                 at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
                 at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
                 at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
                 at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
                 at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
                 at DotNetNuke.Data.SqlDatabaseConnectionProvider.ExecuteNonQuery(String connectionString, CommandType commandType, Int32 commandTimeout, String query)
                 at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script, Int32 timeoutSec)
              ClientConnectionId:06341db9-5dbc-420c-80f1-8d15790d41c9
              Error Number:2714,State:3,Class:16
              2022-03-28 17:13:36,076 [s311074][Thread:19][ERROR] DotNetNuke.Data.SqlDataProvider - System.Data.SqlClient.SqlException (0x80131904): Procedure or function dbo.oa_Export_GetActiveTabModules has too many arguments specified.
                 at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
                 at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
                 at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
                 at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
                 at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
                 at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
                 at DotNetNuke.Data.SqlDatabaseConnectionProvider.ExecuteNonQuery(String connectionString, CommandType commandType, Int32 commandTimeout, String query)
                 at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script, Int32 timeoutSec)
              ClientConnectionId:06341db9-5dbc-420c-80f1-8d15790d41c9
              Error Number:8144,State:3,Class:16
              1. Should I stay at version 9.2.2?

              2. Should I try upgrading by removing "export" module from upgrade package?

              3. there is no table oa_Export_GetActiveTabModules or stored procedure but there is a function

              Is there a way to fix this?






              Veteran Member





                This is very interesting... I can't find the string oa_Export_GetActiveTabModules in any SQL script, and also not in my database (DNN 9.10.2, even in portals that have been installed in DNN 6.0.0 and upgraded). Therefore I guess it is part of a third party extension.

                Have you created an individual upgrade package that contains upgrades for certain modules or other extensions? In this case I would recommend to use the standard upgrade package and install the extension(s) after upgrade.

                There could also be some leftovers in the /install/modules, /install/skins ... folder, please check them before upgrading.

                The important first step is to find out where this function comes from (or to which component it belongs). You can also try (in a testing environment) to delete the function before upgrading and then check if it is there after the upgrade.

                Happy DNNing!
                Michael

                 

                Michael Tobisch
                DNN★MVP

                dnnWerk Austria
                DNN Connect





                New Around Here





                  Michael, I had previously installed Turbo scripts from Sebastian Leupold. But as per instructions, I ran the UnTurbo before upgrade. This is the standard upgrade package downloaded from DNN website.
                  The install folder has lots of .resources files, appear to be 'encoded'.
                  The error log shows:
                  CREATE FUNCTION dbo.[oa_Export_GetActiveTabModules]
                  (
                  @TabID int,
                  @IncludeDeleted BIT
                  )
                  RETURNS @ModuleIds TABLE
                  (
                  ModuleId INT
                  )
                  AS
                  BEGIN
                  DECLARE @StateId int;
                  SELECT @StateId=StateID FROM dbo.[oa_ContentItems] WHERE TabID=@TabID AND ModuleID=-1;
                  --IF there is versioninig with the tab
                  IF(@StateId IS NOT NULL)
                  BEGIN
                  -- Get all distinct module ids which belong to any published version of the tab
                  INSERT INTO @ModuleIds (ModuleId)
                  SELECT DISTINCT TM.ModuleId From dbo.[oa_TabModules] TM
                  LEFT JOIN dbo.[oa_TabVersions] TV ON TM.TabID=TV.TabId
                  LEFT JOIN dbo.[oa_TabVersionDetails] TVD ON TV.TabVersionId=TVD.TabVersionId
                  WHERE TM.TabId=@TabID AND (TV.IsPublished=1 OR TV.IsPublished IS NULL) AND (@IncludeDeleted = 1 OR TM.IsDeleted = 0)
                  END
                  ELSE
                  BEGIN
                  INSERT INTO @ModuleIds (ModuleId) SELECT DISTINCT ModuleId FROM dbo.[oa_TabModules]
                  WHERE TabID=@TabID AND (@IncludeDeleted = 1 OR IsDeleted = 0)
                  END

                  RETURN;
                  END

                  System.Data.SqlClient.SqlException (0x80131904): Procedure or function dbo.oa_Export_GetActiveTabModules has too many arguments specified.
                  at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
                  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
                  at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
                  at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
                  at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
                  at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
                  at DotNetNuke.Data.SqlDatabaseConnectionProvider.ExecuteNonQuery(String connectionString, CommandType commandType, Int32 commandTimeout, String query)
                  at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script, Int32 timeoutSec)
                  ClientConnectionId:06341db9-5dbc-420c-80f1-8d15790d41c9
                  Error Number:8144,State:3,Class:16

                  CREATE PROCEDURE dbo.[oa_Export_TabModules]
                  @TabID int,
                  @IncludeDeleted bit,
                  @ToDate datetime,
                  @FromDate datetime=NULL
                  AS
                  BEGIN
                  DECLARE @Now datetime = GETDATE()
                  SELECT ModuleId INTO #ActiveModuleIds FROM dbo.[oa_Export_GetActiveTabModules](@TabID, @IncludeDeleted)

                  SELECT
                  tm.*, md.FriendlyName,m.InheritViewPermissions,m.IsShareable,m.IsShareableViewOnly, u1.Username AS CreatedByUserName, u2.Username AS LastModifiedByUserName
                  FROM
                  dbo.oa_TabModules AS tm
                  INNER JOIN dbo.oa_Tabs AS t ON tm.TabID = t.TabID
                  INNER JOIN dbo.oa_Modules AS m ON tm.ModuleID = m.ModuleID
                  INNER JOIN dbo.oa_ModuleDefinitions AS md ON md.ModuleDefID = m.ModuleDefID
                  LEFT OUTER JOIN dbo.oa_Users AS u1 ON tm.CreatedByUserID = u1.UserID
                  LEFT OUTER JOIN dbo.oa_Users AS u2 ON tm.LastModifiedByUserID = u2.UserID
                  WHERE
                  tm.TabID = @TabID AND tm.ModuleID IN (SELECT ModuleId FROM #ActiveModuleIds)
                  AND
                  (@IncludeDeleted = 1 OR tm.IsDeleted = 0)
                  AND
                  COALESCE(tm.LastModifiedOnDate, tm.CreatedOnDate, @Now) <= @ToDate
                  AND
                  (@FromDate IS NULL OR ISNULL(tm.LastModifiedOnDate, tm.CreatedOnDate) >= @FromDate)

                  DROP TABLE #ActiveModuleIds
                  END

                  System.Data.SqlClient.SqlException (0x80131904): Procedure or function dbo.oa_Export_GetActiveTabModules has too many arguments specified.
                  at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
                  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
                  at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
                  at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
                  at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
                  at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
                  at DotNetNuke.Data.SqlDatabaseConnectionProvider.ExecuteNonQuery(String connectionString, CommandType commandType, Int32 commandTimeout, String query)
                  at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script, Int32 timeoutSec)
                  ClientConnectionId:06341db9-5dbc-420c-80f1-8d15790d41c9
                  Error Number:8144,State:3,Class:16

                  CREATE PROCEDURE dbo.[oa_Export_TabModuleSettings]
                  @TabID int,
                  @IncludeDeleted bit,
                  @ToDate datetime,
                  @FromDate datetime=NULL
                  AS
                  BEGIN
                  DECLARE @Now datetime = GETDATE()
                  SELECT ModuleId INTO #ActiveModuleIds FROM dbo.[oa_Export_GetActiveTabModules](@TabID, @IncludeDeleted)

                  SELECT
                  tms.*, u1.Username AS CreatedByUserName, u2.Username AS LastModifiedByUserName
                  FROM
                  dbo.oa_TabModuleSettings AS tms
                  INNER JOIN dbo.oa_TabModules AS tm ON tm.TabModuleID = tms.TabModuleID
                  INNER JOIN dbo.oa_Tabs AS t ON tm.TabID = t.TabID
                  LEFT OUTER JOIN dbo.oa_Users AS u1 ON tm.CreatedByUserID = u1.UserID
                  LEFT OUTER JOIN dbo.oa_Users AS u2 ON tm.LastModifiedByUserID = u2.UserID
                  WHERE
                  t.TabID = @TabID AND tm.ModuleID IN (SELECT ModuleId FROM #ActiveModuleIds)
                  AND
                  COALESCE(tms.LastModifiedOnDate, tms.CreatedOnDate, @Now) <= @ToDate
                  AND
                  (@FromDate IS NULL OR ISNULL(tms.LastModifiedOnDate, tms.CreatedOnDate) >= @FromDate)

                  DROP TABLE #ActiveModuleIds
                  END

                  System.Data.SqlClient.SqlException (0x80131904): Procedure or function dbo.oa_Export_GetActiveTabModules has too many arguments specified.
                  at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
                  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
                  at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
                  at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
                  at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
                  at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
                  at DotNetNuke.Data.SqlDatabaseConnectionProvider.ExecuteNonQuery(String connectionString, CommandType commandType, Int32 commandTimeout, String query)
                  at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script, Int32 timeoutSec)
                  ClientConnectionId:06341db9-5dbc-420c-80f1-8d15790d41c9
                  Error Number:8144,State:3,Class:16

                  CREATE PROCEDURE dbo.[oa_Export_Modules]
                  @TabID int,
                  @IncludeDeleted bit,
                  @ToDate datetime,
                  @FromDate datetime=NULL
                  AS
                  BEGIN
                  DECLARE @Now datetime = GETDATE()
                  SELECT ModuleId INTO #ActiveModuleIds FROM dbo.[oa_Export_GetActiveTabModules](@TabID, @IncludeDeleted)

                  SELECT DISTINCT
                  m.*, md.FriendlyName, u1.Username AS CreatedByUserName, u2.Username AS LastModifiedByUserName
                  FROM
                  dbo.oa_Modules AS m
                  INNER JOIN dbo.oa_TabModules AS tm ON tm.ModuleID = m.ModuleID
                  INNER JOIN dbo.oa_ModuleDefinitions AS md ON md.ModuleDefID = m.ModuleDefID
                  LEFT OUTER JOIN dbo.oa_Users AS u1 ON tm.CreatedByUserID = u1.UserID
                  LEFT OUTER JOIN dbo.oa_Users AS u2 ON tm.LastModifiedByUserID = u2.UserID
                  WHERE
                  tm.TabID = @TabID AND tm.ModuleID IN (SELECT ModuleId FROM #ActiveModuleIds)
                  AND
                  (@IncludeDeleted = 1 OR m.IsDeleted = 0)
                  AND (
                  COALESCE(m.LastModifiedOnDate, m.CreatedOnDate, @Now) <= @ToDate AND (@FromDate IS NULL OR ISNULL(m.LastModifiedOnDate, m.CreatedOnDate) >= @FromDate)
                  OR
                  COALESCE(tm.LastModifiedOnDate, tm.CreatedOnDate, @Now) <= @ToDate AND (@FromDate IS NULL OR ISNULL(tm.LastModifiedOnDate, tm.CreatedOnDate) >= @FromDate)
                  )
                  DROP TABLE #ActiveModuleIds
                  END





                  New Around Here





                    Perhaps this is related to Turbo scripts from Sebastian Leupold . I found this issue https://github.com/dnnwerk/dnnScript/issues/11 and although my issue is not same - it does mention Export_GetActiveTabModules
                    I ran the unschema in DNN sql window, rebooted server, then upgrade, so not sure why this is showing up?
                    Should I duplicate this post on github or will Sebastian read it here?





                    Veteran Member





                      I guess (no, I am quite sure) that Sebastian will read it here.

                      The .resources files in the install folder (and below) are nothing but renamed .zip files normally. They contain the installer packages for the appropriate extensions.

                      This is what I meant by "individual" upgrade package. You may drop the installation packages (as .zip files) in the correct folder (/modules for modules, /skins for skins (=themes), /language for language packs etc.) before starting the upgrade. These extensions will then also be updated during the upgrade process (when the file extension is .zip). When the file extension is .resources, they won't be installed during the upgrade, but you can install these components from the Extensions screen - you will find them as "Available extensions" (as far as I remember). But sometimes there are leftovers from older installations, so I check these folders always before running an upgrade.

                      Happy DNNing!
                      Michael

                      Michael Tobisch
                      DNN★MVP

                      dnnWerk Austria
                      DNN Connect
                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

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

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. 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.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved