VS 2005 - SQL Express Connection Question

P

pmclinn

I have created a DB from within my Visual studio 2005 development
studio. My connection string works well on my local machine but when
I copy this to my remote server I get this error:

When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)

My connection string looks like this:
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|
\MyDatabase.mdf;Integrated Security=True;User
Instance=True;Asynchronous Processing=true;"

The win2003 server this is on is run by me so permissions are not an
issue. I've read in some places that people have enabled TCP and such
from within a management console, is this necessary? The file is in
the data directory and is published directly from visual studio. The
only thing that will connect to this db is the webpage. I do not want
to open public ports to the database. I simply want the db only to be
accessible via normal webpage interactions.

How do I configure this to work?
 
E

EMartinez

Are you using SQL Server 2005 Express on the production machine?
Whenever I get this error, it's usually related to the connection
string being incorrect. Hope this is helpful.

Regards,

Enrique Martinez
Sr. Software Consultant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top