DNN Forums

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

Unable to connect to database.

Sort:
You are not authorized to post a reply.





New Around Here





    While installing DNN as per the documentation, It is showing Sql login failed.

    I have created a Database for DNN and also a Login name & password created and mapped to the DNN Database.

    Could you please help me in figuring out the issue.

    Thanks in advance.

     






    Veteran Member





      despite the documentation, I prefer using integrated Windows login. This requires to create a SQL Server account named "IIS AppPool\[AppPoolName]" where you need to replace "[AppPoolName]" by the name of your IIS Application Pool. This Windows Account also needs to be granted write permission for the IIS Website hosting your DNN instance and in Advanced Settings of the IIS App Pool, "Identity" needs to be set to "ApplicationPoolIdentity".
      In your web.config, you don't need to specify user or password, just add "Integrated Security=true".
      This is the easiest and most secure configuration.





      Veteran Member





        In addition to what Sebastian said, you should use SSMS (SQL Server Management Studio) to verify your credentials for connecting to the database.
        Joe Craig
        DNN MVP
        Patapsco Research Group





        Veteran Member





          SSMS is usually the best tool to manage your SQL Server and databases, including backups. If, for some reason, you can't install it on the server, you may check login credentials as well using ODBC manager in computer management.





          Veteran Member





            If your IIS and SQL Server are not on the same machine it could be also Firewall rules that block the access.

            Happy DNNing!
            Michael

            Michael Tobisch
            DNN★MVP

            dnnWerk Austria
            DNN Connect





            New Around Here





              I tried with integrated Security but showing up error as below :

              Database Connection Error

              ERROR:Index #: 0
              Source: .Net SqlClient Data Provider
              Class: 11
              Number: 4060
              Message: Invalid Database

              Index #: 1
              Source: .Net SqlClient Data Provider
              Class: 14
              Number: 18456
              Message: Sql login failed





              Veteran Member





                did you check the SQL server user account for its default database (the user needs to have access) and did you grant access permission to this user for the DNN database you are trying to access?
                You are not authorized to post a reply.

                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