Question

Photo of Richard Sanford

0

Problem with database connection on new setup..

ok I'm a Rock newbie here trying to get our initial rock development setup and running into a problem connecting to the database I created. I'm getting an error condition of :

ex {"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)"} System.Exception {System.Data.SqlClient.SqlException}
 

my web.connectionstrings.config is setup as ;

<connectionStrings>
<add name="RockContext" connectionString="Data Source=[RICHARD-SB\SQLEXPRESS];Initial Catalog=[RockBW]; User Id=[RICHARD-SB\rockmgr]; Password=[honda750]; MultipleActiveResultSets=true" providerName="System.Data.SqlClient"/>
</connectionStrings>

So I am assuming that probably there is something I didn't do in the database setup most likely. Anyone have ideas of what I should check?

Thanks...
Richard Sanford
Brookwood Church



  • Daniel Hazelbaker

    Hi Richard, I've not seen a connection string with all the [ and ] characters. Have you tried without those? Otherwise I don't see anything obvious other than making sure the server and database name are correct.

  • Photo of Richard Sanford

    0

    thanks Daniel, the brackets were probably from a cut and paste I did, removed them and got further down the road to the next problem block of:

    + ex {"Spatial types and functions are not available for this provider because the assembly 'Microsoft.SqlServer.Types' version 10 or higher could not be found. "} System.Exception {System.InvalidOperationException}

    Thinking maybe I just need to delete everything and start over...

    • Don Smallman

      Are you hosting on Azure, or another host? Also, did you just a normal SQL installation (No changes)?

    • Daniel Hazelbaker

      I was doing some testing so I don't have the VM anymore. But it was an Azure VM hosted against an Azure SQL Database. I had used the standard installer but I was building a normal Rock system. For development environment you can use the dev version of SQL Server or Express.