I recently inhereted a DNN site that has went down as of yesterday (I made no changes to it).
On the front end I see the error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed."
I looked at the logs in /Portals/_default/Logs and I see
"2018-08-21 05:57:01,024 [WEBA9][Thread:37][ERROR] DotNetNuke.Common.Initialize - The connection to the database has failed, however, the application is already completely installed, a 500 error page will be shown to visitors"
Does anyone know how I could begin to start debugging this? I'm completely new to DNN. Thanks!
You'll want to start by looking at your web.config file in the root of the site.
From there you'll find the connection string. (control-F to search)
Using the Connection information in that connection string, you should try
Try remoting into the database server to see if you can access it via Remote Desktop, can you access it? Does that server need rebooting?
Try connecting to the database using SSMS (SQL Server Management Studio) using the username/pwd in the connection string.
I imagine that the SQL server is for some reason offline, and you'll need to get it back up and running.
It can happen after a reboot of the server. When IIS with the DNN site comes online earlier than the SQL server is done loading.
Stopping and starting the AppPool of the DNN installation might help.
Related
DNN Upgrade error from 9.1 to 9.3.2 : After upgrade we observe that if we reboot server and immediately try to access the web site then we get error like 'Connection To The Database Failed'.This is happen only first time after server reboot. once we start receiving this error after then we continue receive this error irrespective of how many times we hit website. It is exists till we do IIS Restart or Application pool recyle manually.
Because of this issue we have paused server reboot schedule as well.
Please guide how to overcome from this.
Just a guess, but is it possible that SQL Server starts up slowly after the reboot.
Try waiting 5 minutes before going to the website.
I'm actually a bit surprised that you have this on a DNN 9 installation. I haven't seen it myself as of DNN 8.
I recall solving that by changing the startup type for IIS (in the services MMC) from "Automatic" to "Automatic (Delayed)". That should give SQL Server a decent chance to be started before IIS is.
You could also try to configure the IIS service being dependent on SQL Server (if both IIS and SQL Server are installed on the same machine):
sc config W3SVC depend=MSSQLSERVER
Take care, if you are using a named instance as in the SQL Server Express standard installation, the name could be MSSQL$SQLEXPRESS or whatever instead of MSSQLSERVER. Have a look at the properties of the service to find out.
I was working on an ASP.NET MVC5 application and pushed it to git. Someone else cloned the project to their computer.
When they try to run the app it works up until there is a database call. They get the error message:
System.Data.SqlClient.SqlException: '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)'
In the Server Explorer we can see that the connection is closed. We also see no tables at all, like as if there was no database.
Does anyone know how we can approach this? I'd think that the connection string remains the same on each machine? The database was created code first, do we somehow have to recreate it? If so, how?
Thanks for your suggestions!
The connection string should be the same.
You should first disable Windows Firewall and antivirus programs (and similars), if they're present, and test again.
You should try a connection via another database client too, just to check if you are blocked someway.
If these attempts doesn't solve the problem, you can recreate the database for test pourposes, if you will. For Entity Framework, for example, search "migrations" term in Google.
The error is relevant. Obviously, from the computer hosting the cloned solution, the SQL server is not reachable.
If, in development, you used a local SQL Server (like SQL Express or Local DB), you must verify that on the computer hosting the clone solution you have the same setup. If you used a remote server, you must check that the server is available to the computer hosting the cloned solution.
In both cases, you can use Server Explorer to verify the db connection and access.
Unfortunately, there is no satisfying answer.
At first, we reinstalled Microsoft SQL Server. That alone did not help.
We did change the autentication from Windows Authentication to SQL, because the person working on that workstation still had the account details from the previous owner.
That alone did make the test connection successful. But then, we got another error when doing the "Update-Database" command in VS, which we solved by deleting a rogue migration that was there for some reason unknown.
Now it works - sorry for not offering a more concise solution.
I know this question has been asked many times, but none of the symptoms seem to match my problem and thus none of the solutions work.
I am in the process of moving a DNN site (v. 7.04) from our company's IT infrastructure to an externally hosted VM as they were unable to give guaranteed up time. (The last straw was when their DNS server fell over Friday afternoon and we couldn't even contact anyone until Monday morning. Still took them two more days to fix it, but I digress...)
I'm administering the VM so I have full access to it and the software running on it. I do not have access to the server on which the website and database are currently running.
I have copied the website files from the old server to the new and have been provided with database backups which I have successfully restored on the new VM. The new VM is running IIS 8.5, SQL Express 2014 and Windows Server 2012 R2 Datacenter. I have set up the website in IIS and given read/write permissions to NETWORK SERVICE and IIS_IUSRS. The web.config file can be read as if I type something silly I get a syntax error showing the correct line.
Now here is where things diverge from the trivial (for me at least). I can connect to the database (on the local machine) using Management Studio, HeidiSQL and the Data Link Properties dialog (see https://www.sophos.com/en-us/support/knowledgebase/65525.aspx). All three of those work fine. When I put the connection string into the web.config, I get the can't connect error. The precise message is "DNN Error Connection To The Database Failed".
Here's the connection string I'm using, it's nothing special and is what the production server is currently using, though with a different data source of course:
Data Source=[machine]\[instance];Initial Catalog=[database]; User ID=[user];Password=[password];
I'm guessing it's not the database itself since that seems to be fine and I can connect to it as mentioned, so I'm thinking maybe something in IIS?
Any help would be appreciated.
This is 2nd day I'm spending on this sql server problem! long story short, I have downloaded/installed sql server 2014 express version on my windows 8.1 operating system. sql server works fine however when I get in it and create tables or etc, when I run asp.net (mvc 4) and click on login page or register page it throws following error:
error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.
I have searched in stackoveflow and also msdn, few other forums but did not find a specific and solution to nail this down.
on my machine I have:
SQL SERVER (MSSQLSERVER) service running (Automatic)
Microsoft LocalDB is installed
However,
SQL Server Browser stopped
SQL Server Agent stopped
every time I am trying to restart or start them I get this message:
The service cannot be started, either because it is disabled or because it has no enabled device associated with it[0x80070422]
I also tried this solution but it didn't help. please see this URL
http://www.aspneter.com/2013/08/error-50-local-database-runtime-error-occurred/
Can this be something in web.config?
any help will be appreciated greatly.
Thanks.
amit
Ok the problem is resolved by downloading Microsoft SQL Server 2012 SP1 Feature Pack.
Service Pack SP1
Greetings – To automate testing of our database SPROCs, we’ve been using dynamically created databases inside of a User Instance. This has been working very well – the build server and, until very recently, all the developers could all run the tests. However, one of our developer machines is now returning the following error when we try to connect to the user instance:
Failed to generate a user instance of
SQL Server due to a failure in
starting the process for the user
instance. The connection will be
closed.
Here is what the log file says:
2008-12-04 10:46:29.77 Logon
Error: 15372, Severity: 16, State: 1.
2008-12-04 10:46:29.77 Logon
Failed to generate a user instance of
SQL Server due to a failure in
starting the process for the user
instance. The connection will be
closed. [CLIENT: ]
What I’ve done to fix it so far
Deleted C:\Documents and Settings[username]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data
Changed SQL Service to run as “Local System” instead of “Network Service”
Uninstalled SQL Express, deleted ALL data directories (e.g. “MSSQL.1”), and reinstalled SQL Express
None of these “fixes” have fixed the problem. It used to work on the machine in question, and we would like not to have to repave it.
Please help!!!
Thanks - Jordan
Okay, I tried all of the above fixes again, and then I restarted the entire system and it appears to work. Strange! I had restarted my system in the past, but it looks like you have to apply these fixes first and then restart. I think I'll try switching the service back to logging in as Network Service.
Thanks - Jordan
I found the same issue on my azure VM. Then I opened the SQL Server Configuration Manager, opened SQL Server Network Configuration, -Protocols for and found that "Named Pipes" and "TCP/IP" were disabled. I enabled them, and the error went away.