An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
For some Reason I needed to add this to my connection string in the web.config file.
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Server=servername Database=dbname; User ID=user; Password=something; Trusted_Connection=False" providerName="System.Data.SqlClient"/>
so the whole entry looks like this:
<connectionStrings>
<add name="ClubSiteDB" connectionString="Server=servername; Database=dbname; User ID=user; Password=password123; Trusted_Connection=False" providerName="System.Data.SqlClient"/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Server=servername Database=dbname; User ID=user; Password=something; Trusted_Connection=False" providerName="System.Data.SqlClient"/>
</connectionStrings>
Please support this blog by clicking on the advertisments to the right.


