views:

198

answers:

2

I have a Sql Server 2005 DB on Godaddy. I have Visual studio 2008 not express on my PC. I have tried to set the connection between VS2008 and SQLS2005 to start a project building the formns but it will not connect. I have entered the Hostname, Database name, initial file, username, and password but when I test the connect it fails. I have tried connecting ode and SQl options. Im tried connection through asp but nothing is working. When I go to the host site I can connect so I know the Username and Password are corrent. Is there some thing I might be misssing. The error says that authorization is denied and I should check to make sure the haost site is set to authorize out side access. Per Goddady it is suppose to be set up for that. Has anyone had any experiance with connecting to a sql server DB on godaddy?

+1  A: 

Try connecting to the DB via Management Studio. If you can successfully connect to it from there, then check syntax in web.config. However, if you cannot hit the database from management studio, you will likely need to contact the web host for proper connection string to your database.

SidC
+1  A: 

You will not be able to connect directly to the hosted GoDaddy version of your database from your own Visual Studio setup running on your PC. The GoDaddy network has been secured against outsiders hitting their hosted databases -- and this is a very good thing. (Imagine, if someone compromised your connection string, the raw damage they could do from literally anywhere in the world if this were possible.)

Instead, use GoDaddy's tools to back up the database, download the backup, and restore it to SQL Server 2005 or 2008 Express editions. Develop against that.

When you're developed and tested, upload your app to GoDaddy, and change the connection string to the GoDaddy parameters.

Generally it's not recommended that you develop directly against a live (production) database to begin with -- by using the technique I describe, you are developing against a local copy of the database, and not impacting the real data.

John Rudy