views:

1931

answers:

2

When I publish my project clients will need to be able to setup the initial configuration, and part of that is the Sql Database Connection. I have an instance of Sql Server 2008 running on my system (MSSQLSERVER2008) as well as SQLEXPRESS2005. I am trying to use the following connection string locally just to see if this works, and I can't get it to work:

ConnectionString = {Data Source=127.0.0.1;Initial Catalog=DCOMProductionsDesktop;Integrated Security=False;User ID=DCOMProductionsDesktopService;Password=;Network Library=dbmssocn}

The error I get is the usual "The target machine actively refused the connection".

*There isn't any firewalls running, and its inside the network anyway *TCP/IP Protocols are enabled *Remote Connections are enabled and permitted

So, I'm stumped.

Edit

I changed the connection string's data source to:

DataSource=192.168.0.2\MSSQLSERVER2008 on my WinXP VM (for testing remotely)

Now, this did work. But when I deploy this across the internet, will that same connection string work for clients outside my network using a domain name such as:

DataSource=desktop.dcomproductions.com\MSSQLSERVER2008

Or will I need to do something different?

+1  A: 

It's been a while sice I used anything but Named Pipes to connect to a sql server instance so this may not be relevent but try changong Data Source to Server.

They may be synonyms, as I said, it's been a while.

Also, even if you are using an IP address, you aren't specificying an instance of sql server to connect to, that may also be causing issues

Crippledsmurf
See my edits in my original post, I saw your post after I made edits, but it seemed to work. Just need to know if this would work from outside my network
David Anderson
+1  A: 

It will work, as long as "desktop.dcomproductions.com" or whatever, resolves to the proper IP address. So that name should be set up either on the public or private DNS properly.

Also, make sure it resolves to a public/external IP address, unless your client's scripts are going to be within the same network as the SQL server.

Thought I post it as an answer, instead of comments :)

Sev
And it was the precise answer I was looking for after I solved the initial question. This is very relieving to know. Thanks for the information!
David Anderson

related questions