Ken Barrett

Ken Barrett

  • NA
  • 123
  • 0

web.config file problems

Oct 13 2009 12:13 PM
I have a goDaddy account on one of their windows servers so I can run .aspx pages.

The problem I am currently having is in regard to me wanting to add a guest book. As a learning experience I decided to use MS SQL to store the data entries.

Using Visual Web Designer I got this running on my PC. Works like a charm.

Now I want to transfer this to goDaddy.

I created the MS SQL database and made a Guestbook data table.

I transfered my web site over to goDaddy using Xcopy (not compiled) and changed the sql connection string in the Web.config file to match what I found under the Configuation button in the Databases section of my account.  I followed that goDaddy support did to the letter. But it doesn't work.

There is something wrong with the Web.config file. (I have other issues as well, but that will come later)  Here is what my Web.config file looks like:

<?xml version="1.0"?>
<configuration>
  <appSettings/>
  <connectionStrings>
    <add name="GuestDBconn"
      connectionString="Data Source=(-- this section taken from the 'hostname'--) ;
      Initial Catalog=(-- this section taken from database name --); User ID=(-- sql database user id --);
      Password='(-- sql database password --)'"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <customErrors mode="Off"/>
  </system.web>
</configuration>


When I open up one of the guest book .aspx pages I get a run time error. The interesting thing is that it doesn't get to the system.web section, because the error I get suggests setting customErrors mode="Off". So it is dying before it reaches that point.  Also, when I take the connection string section out, the page opens fine.  Of course it cannot connect to the database.

Any help on this would be appreciated.
TIA
Ken Barrett

Answers (3)