San Diego Website design home Contact Us Client Login


Thursday, June 19, 2008

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.

Comments

Name
URL
Email
Email address is not published
Remember Me
Comments

CAPTCHA
Write the characters in the image above

San Diego Website Design
San Diego Flash Design
Testimonials
Contact Us
Support
Privacy Policy
Site Map