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

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" ?

Web.config:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
      <appSettings/>
      <connectionStrings>
  <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" />
   </connectionStrings>
  <system.web>
   
    <trace enabled="true" localOnly="false" />
    <compilation debug="true" />
    <roleManager enabled="true"/>
    <pages>
      <namespaces>
        <clear/>
        <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"/>
      </namespaces>
    </pages>
       <authentication mode="Forms"/>
   
    <membership>
      <providers>
        <remove name="AspNetSqlMembershipProvider"/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" passwordStrengthRegularExpression=""/>
      </providers>
    </membership>
    <profile>
      <properties>
        <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"/>
      </properties>
    </profile>
    <customErrors mode="Off"/>
  </system.web>
</configuration>
PrimeNYAsked:
Who is Participating?
 
chinu1310Commented:
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.
Ihttp://help.godaddy.com/article_list.php?topic_id=216&ci=8058

Hope it helps
0
 
chinu1310Commented:
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.
0
 
PrimeNYAuthor Commented:
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?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.