Trying to connect to an SQL db using ASP.Net on godaddy

Posted on 2008-11-15
Last Modified: 2012-05-05
I am using Visual Studio 2008 and trying to develop an applicaiton that connects to an MS SQL database.  The site and database are hosted at  Since godaddy does not accept remote connections to the database I am having trouble configuring a connection that works.  Can anybody walk me through the process of connecting.  From my past experience with Coldfusion I could setup a testing server locally and using a DSN I could test my app locally and get it would work using the DSN once uploaded.  I have created a DSN on godaddy for this database but do not know how to use it in ASP.NET.  Thanks
Question by:nelsonhale
    LVL 39

    Expert Comment

    This will show you how to build your connection string.

    Then all you do is have two different connection strings in your app.  A "LOCAL" one for testing, and your hosted one for when you deploy.

    Author Comment

    Thanks for the response.  I can get the connection string from Godaddy:  Data; Initial Catalog=BuildItWithLogs; User ID=BuildItWithLogs; Password='your password';

    I have a simple data grid that I am trying to fill.  In visual studio I can create Data Connection to hit my local database ( a simple access db).  I'm not sure using the data connection wizard how I create a separate connection using connection string.  If I choose SQL server as the Data Source it doesn't let me save this connection because it can not actually be verified, I'm assuming.  Again because godaddy is not allowing remote connections.  I've also tried to setup using ODBC but run into the same problem.  Thanks for your help.
    LVL 39

    Accepted Solution

    That connection string is stored in your app config file.  Just add the second one in (commented out) and swap them on deploy.  Or, have a different build set that builds with a different option.

    Author Closing Comment


    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Suggested Solutions

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now