DNN Forums

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

Installation Error on Windows Plesk - First time installing DNN

 9 Replies
 3 Subscribed to this topic
 25 Subscribed to this forum
Sort:
Author
Messages
New Around Here Send Private Message
Posts: 2
New Around Here

I am the administrator of a Plesk server installed on an AWS EC2 instance. I am able to run standard .NET applications on the sample domains created within the Plesk server. Currently, I am exploring DotNetNuke (DNN) for one of my domains to evaluate its site customization features. Unfortunately, I am encountering issues that are preventing me from progressing with the DNN installation.

Below are the versions of the software used in my environment:

Operating Systsem : Microsoft Windows Server 2022 DNN Version : 9.13.4 SQL Server DB : Microsoft SQL Server, v15.00.2000 ASP.NET Framework : 4.8.0 Plesk Version : Plesk Obsidian v18.0.64_build20241008.15

Error screens : 

The screen is not progressing, and I found the below logs in the directory httpdocs/Portals/_default/Logs

2024-10-17 02:35:13.221+00:00 [EC2AMAZ-A1P179A][D:2][T:8][ERROR] DotNetNuke.Data.PetaPoco.PetaPocoHelper - [3] Error executing SQL: ;Exec dbo.GetPortalAliases Could not find stored procedure 'dbo.GetPortalAliases'. 2024-10-17 02:35:13.221+00:00 [EC2AMAZ-A1P179A][D:2][T:8][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'dbo.GetPortalAliases'.    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.SqlDataReader.TryConsumeMetaData()    at System.Data.SqlClient.SqlDataReader.get_MetaData()    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)    at DotNetNuke.Data.PetaPoco.PetaPocoExt.ExecuteReader(Database database, String sql, Object[] args)    at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteReader(String connectionString, CommandType type, Int32 timeoutSec, String sql, Object[] args)    at DotNetNuke.Data.SqlDataProvider.ExecuteReader(String procedureName, Object[] commandParameters)    at DotNetNuke.Entities.Portals.PortalAliasController.<>c.b__16_0(CacheItemArgs c)    at DotNetNuke.Common.Utilities.DataCache.GetCachedDataFromDictionary(CacheItemArgs cacheItemArgs, CacheItemExpiredCallback cacheItemExpired) ClientConnectionId:c47cffa6-d5fc-4179-8ba0-447f3d676e32  

On the other hand I can connect to database using PHP script without any issues.

 

I noticed the below 403 errors in the network tab. Based on some suggestions, I attempted the installation by disabling the HTTP to HTTPS redirect. However, I am still encountering a 403 error. I have followed the recommended steps in the DNN installation guide and assigned the necessary permissions to the entire httpdocs directory as outlined here: DNN Folder Setup Guide.

Do I need to install DNN in a subdirectory? Currently, I have extracted the DNN installation zip directly under the httpdocs folder

 

 

Could you please help me resolve the error mentioned above, as I am having difficulty progressing with the installation?

 

Thank you in advance.

Prem

Senior Member Send Private Message
Posts: 1513
Senior Member

Hello!  

This could be anything.  The user account needs to be properly set-up (including being a dbo), and the network connection needs to be allowed.  

I've generated some installation videos using AWS Workspaces in the videos below.  Maybe that will be helpful for you.  Perhaps there's a easy-to-miss step that will jump out at you.  😎 

New Around Here Send Private Message
Posts: 2
New Around Here

 

Hi Will, Thanks for your reply. In my case, most of the installations were done through the Plesk administration control panel. In the plesk administration I navigated to  Plesk Admin Login → Tools & Settings → Updates → Add and Remove Product Components

Below is the list of installed product components. I’m not sure how to verify the settings as described in the video you shared. Could you please guide me on that especially in case of plesk?

Thanks in advance,

Saiprem

Senior Member Send Private Message
Posts: 1513
Senior Member

Whoa... That's a lot to support on a server. First, if you can avoid it, I'd never suggest putting Windows apps and PHP/MySQL apps on the same server.  If you are able, I'd suggest uninstalling all of that.  

In general, only install things that you absolutely need.  For example, unless you're using Git for some kind of deployment strategy, it shouldn't be installed either.  

It's not clear what the issue may be, from this screenshot and the details you've provided.  However, you may want to enable Server Side Includes and Dynamic Content Compression.  

New Around Here Send Private Message
Posts: 2
New Around Here

Hi Will,

I have removed Node.js and PHP/MySQL from the server, and I enabled SSI and Dynamic Content Compression as suggested. However, my problem still isn't resolved. I’m still seeing the same error that I mentioned in my initial thread. It shows a "DB connection error," and I’m unable to proceed beyond the initial installation screen.

PHP is installed to test the DB connectivity to MSSQL, and I can confirm that the connection is working from PHP without any errors. 

It would be really helpful if you could suggest the next steps to troubleshoot this issue.

Thank you for your help!

Saiprem

 

Advanced Member Send Private Message
Posts: 244
Advanced Member
Can't really know with only this information, something is preventing the sql connection is all we can know with this information, check you login/password, sql settings, etc. Few people buy Plesk themselves, maybe the hosting provider has some clues about the issue...
Senior Member Send Private Message
Posts: 1513
Senior Member

The database connection issue is going to be either with the information you're providing to the connection string (install view), or the website isn't able to access the server/hosting location where the database is for some reason. 

The first part can be fixed by only copying and pasting the necessary values.  Due to the number of times over the years of running into this issue myself, I always copy and paste.  This avoids the easy-to-miss typos that get in our way. 😎 

Related to the above, the values used need to be valid.  The DNS/IP address (server) needs to be a network path that the webserver is able to see and access.  Sometimes firewalls and DNS settings can be in the way (see below). 

The database name is rarely an issue, assuming it only contains values that are XML-friendly. 

The username and password or user account that you choose to use needs to have db_owner permission to the entire database. This is true except in the more advanced use cases where a SQL DBA may have a more complicated schema in place.  In these instances, though, I'd suggest putting DNN in its own database, if possible.  

The latter issue where the SQL database might not be able to be seen by the web server can either be far easier or complicated to troubleshoot.  It depends on the root cause.  A firewall may be blocking the network communication for some reason, or the IP address/DNS name you're using isn't available to the webserver.  It may be necessary to open a port in the firewall or to add the webserver to the allowed list for your database server.  

An easy way to start troubleshooting this would be to use SSMS on the web server to attempt to use the same credentials.  This will allow you to test the details you think are accurate, and then see a more detailed error that might allow for more troubleshooting. 

Veteran Member Send Private Message
Posts: 350
Veteran Member
The database user you created in Plesk will not by default have enough permissions for DNN. You will need to go into SQL Server Management Studio and go to top-level Security > Logins. From there, go to the properties for the user you created in Plesk for this database. Then in the User Mapping page, highlight the database and make sure "db_owner" is checked. You should be good to go from there.

David Poindexter


Creator:


New Around Here Send Private Message
Posts: 1
New Around Here
*I may have submitted another incomplete reply earlier due to not realizing a combination of macro-enter keystrokes automatically submits the reply but does not give me any line breaks. Hi, I have also been trying to install DNN with Plesk on a Windows VPS for a while and had been stuck at the same SQL connection errors. I was fortunate enough to have figured out some of the aforementioned issues myself including: removing all PHP/MySQL support, using SSMS to assign db_owner permissions, etc. Instead of using PHP, I have also verified the connection with the credentials using PowerShell. From the logs, it had run into a number of errors before the fields were even filled in, potentially with the autodetect sequence: [code]2025-03-07 13:41:05.251-05:00 [WIN-V0BKSR7HGPE][D:2][T:9][ERROR] DotNetNuke.Data.PetaPoco.PetaPocoHelper - [1] Error executing SQL: ;Exec dbo.GetDatabaseVersion A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 2025-03-07 13:41:05.360-05:00 [WIN-V0BKSR7HGPE][D:2][T:9][ERROR] DotNetNuke.Data.PetaPoco.PetaPocoHelper - [1] Error executing SQL: ;Exec dbo.GetDatabaseVersion A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 2025-03-07 13:41:35.501-05:00 [WIN-V0BKSR7HGPE][D:2][T:9][ERROR] DotNetNuke.Data.PetaPoco.PetaPocoHelper - [3] Error executing SQL: ;Exec dbo.GetPortalAliases A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 2025-03-07 13:41:35.501-05:00 [WIN-V0BKSR7HGPE][D:2][T:9][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at PetaPoco.Database.OpenSharedConnection() at DotNetNuke.Data.PetaPoco.PetaPocoExt.ExecuteReader(Database database, String sql, Object[] args) at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteReader(String connectionString, CommandType type, Int32 timeoutSec, String sql, Object[] args) at DotNetNuke.Data.SqlDataProvider.ExecuteReader(String procedureName, Object[] commandParameters) at DotNetNuke.Entities.Portals.PortalAliasController.<>c.b__16_0(CacheItemArgs c) at DotNetNuke.Common.Utilities.DataCache.GetCachedDataFromDictionary(CacheItemArgs cacheItemArgs, CacheItemExpiredCallback cacheItemExpired) ClientConnectionId:00000000-0000-0000-0000-000000000000 Error Number:-1,State:0,Class:20[/code] I have also seen a number of provider library related errors, which I managed to reduce by reverse-retrofitting these components from older versions of DNN, but none of these solved the connection problems. It might be worth mentioning that the bottom of the installation wizard page says "Database Connection Error" every time it is initialized before any user interaction. I installed the DNN instance by simply using Plesk to set up a blank .NET environment, and pasted the unarchived install files into the website root folder, and followed the documentation to set up the environment, while Plesk also runs on the same Windows VPS as the IIS and MSSQL so I assumed firewall is not of concern. Please let me know if I missed anything during the installation steps to make this work. Operating System: Microsoft Windows Server 2022, DNN Versions Tested: 10.0.0rc0001, 10.0.0rc1, 10.0.0rc2, SQL Server : MSSQL Server 2022, ASP.NET Framework : 4.8.0, Plesk Version: 18.0.67 Update #3
Veteran Member Send Private Message
Posts: 259
Veteran Member

McPlayerTeam, you've to make sure the SQL instance name is correct, this error "...The server was not found or was not accessible." is related to the sql server instance itself.

Maybe you can try to connect to the SQL Server instance using SQL Server Management Studio and once ou get this right, copy out the SQL Server Instance into the Connection String.

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