Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik 1608 posts 7234 karma points MVP 7x c-trib
    Sep 23, 2015 @ 16:30
    Nik
    0

    Unable to connect to database

    Hey guys,

    I've just moved an Umbraco site from one server to another. The new server already has 2 other Umbraco sites on it working fine.

    They all share an SQL instance, however for some reason the site I have just moved cannot connect to it.

    I get the error:

    Umbraco cannot start. A connection string is configured but the Umbraco cannot connect to the database.

    The server has SQL management studio installed so I used that to connect to the Instance using the same connection details that are in the web config connection string, (Copied and pasted to prevent typing errors) and it is able to connect.

    What should I be looking for, as far as I can tell everything is correct.

    FYI, I'm using an Amazon MSSQL RDS instance as the database server.

    Please help, any idea's would be appreciated.

  • Matthieu Nelmes 102 posts 385 karma points
    Sep 23, 2015 @ 20:57
    Matthieu Nelmes
    0

    Had a similar issue with an Azure hosted SQL db

    Try adding this to your connection string if it isn't already there -

    Trusted_Connection=False;Encrypt=True;
    
  • Matthieu Nelmes 102 posts 385 karma points
    Sep 23, 2015 @ 21:00
    Matthieu Nelmes
    0

    Also, double check that you are providing the port number ,1433 after the Server address.

    Or a better idea would be to compare the connection strings in the working Umbraco website web.config files

  • Nik 1608 posts 7234 karma points MVP 7x c-trib
    Sep 23, 2015 @ 22:40
    Nik
    0

    Hi Matthieu,

    Thank you for your advice. I generated the connection string by taking a working one and updating the username and password information which is why the issue is confusing me so much.

    I'll try the Encrypt aspect but I suspect it's not going to help.

  • Nik 1608 posts 7234 karma points MVP 7x c-trib
    Sep 25, 2015 @ 22:05
    Nik
    0

    So for anyone that finds this thread, my issue seemed to be something a bit more serious than the above error. My entire installation appears to have been corrupt, yet the same corrupt site works on its original server. I've had to resort to re-creating most of the physical files even though all I've needed to do was copy and paste the internal contents of them.

    As for an explanation as to why this occurred I've no idea.

Please Sign in or register to post replies

Write your reply to:

Draft