[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


An error has occurred while establishing a connection to the server.

Posted on 2007-08-07
Medium Priority
Last Modified: 2013-11-27
I'm using VWD Express 2005 which uses sql server 2005.  Web site works fine on local host but when I use FTP to copy to server (a shared server at GoDaddy.com) I get this error message when I try to open a page which requires database interaction in my browser.  (see it at www.PrimeRB.com/Listings.aspx)  I have gone into sql server 2005 and configured it for local and remote connections instead of local connections but still no luck.  I believe the problem has to do with the connectionstringname in the web.config file but I don't know why.  Something to do with "LocalSqlServer" ?

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <add name="ASPNETDBConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"
   providerName="System.Data.SqlClient" />
  <add name="ConnectionString" connectionString="Expression: SampleData"
   providerName="System.Data.SqlClient" />
    <trace enabled="true" localOnly="false" />
    <compilation debug="true" />
    <roleManager enabled="true"/>
        <add namespace="System"/>
        <add namespace="System.Collections"/>
        <add namespace="System.Collections.Specialized"/>
        <add namespace="System.Configuration"/>
        <add namespace="System.Text"/>
        <add namespace="System.Text.RegularExpressions"/>
        <add namespace="System.Web"/>
        <add namespace="System.Web.Caching"/>
        <add namespace="System.Web.SessionState"/>
        <add namespace="System.Web.Security"/>
        <add namespace="System.Web.Profile"/>
        <add namespace="System.Web.UI"/>
        <add namespace="System.Web.UI.WebControls"/>
        <add namespace="System.Web.UI.WebControls.WebParts"/>
        <add namespace="System.Web.UI.HtmlControls"/>
       <authentication mode="Forms"/>
        <remove name="AspNetSqlMembershipProvider"/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" passwordStrengthRegularExpression=""/>
        <add name="FirstName"/>
        <add name="LastName"/>
        <add name="Address1"/>
        <add name="Address2"/>
        <add name="City"/>
        <add name="State"/>
        <add name="Zip"/>
        <add name="Phone"/>
        <add name="Email"/>
        <add name="ID"/>
    <customErrors mode="Off"/>
Question by:PrimeNY
  • 2
LVL 14

Expert Comment

ID: 19648301
Where you are trying to host your application ? If on any server than you have to change the connection string. You might also have to create the database on the server where you are copying the application.

Author Comment

ID: 19648493
Thanks for your comment.  Web site is being hosted by GoDaddy.com.  Change connection string (where) in web.config to what?  What is involved to create database?
LVL 14

Accepted Solution

chinu1310 earned 1500 total points
ID: 19648536
That is all you have to retrive from godaddy.
When you host web site they will have their help pages and knowledgebase where you can find out how to setup your database for your web site.

Check this link.

Hope it helps

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question