473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VS 2005 - SQL Express Connection Question

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=|DataDirector y|
\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?

Mar 22 '07 #1
1 2765
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
pmclinn wrote:
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=|DataDirector y|
\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?
Mar 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Loane Sharp | last post by:
Hi there I'm not sure that this is strictly relevant to the ASP.NET newsgroup, but perhaps you've encountered a similar problem. Please help!!! I'm using the "System.Data.SqlClient" namespace...
1
by: Wade | last post by:
Is it possible to connect to a SQL 2005 Express db using Visual Basic 2005 Express? I cannot get past the connection.open statement without the error "...Version=2.0.0.0;...
7
by: aaa | last post by:
I have a problem connecting .net 2003 (framework 1.1) with sql express 2005 (framework 2.0) What is the problem: definitions or compatibility?
13
by: josh | last post by:
I'm pretty new to both sql 2005 and VB but please bear with me. I have installed SQL 2005 express on a Windows 2003 Standard server. I have also installed VB 2005 Express edition on the server. SQL...
1
by: Marvinq | last post by:
I'm a newbie to asp.net, but I have been a programmer for years. I have a question that I'm hoping someone can give me a good answer for, I have been trying to set up a site remotely and I've...
9
by: Gabriel | last post by:
Hello, I installed SQL server 2005 SP1 on a Windows XP SP2 From Visual Studio, I'm trygin to create a connection to a database, but I receive this error but I'm creating the connection (I...
3
by: ianforgroupuse | last post by:
I'm running Vista Business edition on 2005 Virtual PC. Installed SQL Server 2005 Express latest download, with instance of MSSQLSERVER and service accounts running under "NT AUTHORITY\SYSTEM"....
2
by: raylopez99 | last post by:
I am trying to program a database from inside C++.NET via Visual Studio 2005 using the ADO.NET set of classes, but this I believe is a SQL Server 2005 Express permissions question under Windows XP...
3
by: =?Utf-8?B?TUVH?= | last post by:
I've installed VB Express 2005 and SQL Server 2005 Express on a workstation that had SQL 2000 on it. I can only get VB Express to connect to the SQL Server 2005. From other groups I read that...
6
by: greg.hart | last post by:
Hello all, Just wanted to get some clarification on something. I was setting out to create a login page for people to login and then be able to access certain aspects of the website. Instead...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.