VS error - SQL Server not allow remote connections

V

VB Programmer

I have an ASP.NET 2.0 site i'm creating in VS.NET. I left it a few days
ago, after I had implemented membership, worked on some db tables, etc...

Today I go to open the Data Connection to the SQL Express db thru the VS
interface and I get this error:

An error has occurred while establishing a connection to the server. When
connection 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 - Erro Locating Server/Instance
Specified)

I hit OK and the db does not show up.

Any ideas what could be causing this?

Does it matter in my web.config that I added this?
<membership defaultProvider="CustomizedProvider">
<providers>
<add name="CustomizedProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0" />
</providers>
</membership>

The LocalSqlServer is defined in the web.config as this:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
 
G

Guest

I have an ASP.NET 2.0 site i'm creating in VS.NET. I left it a few days
ago, after I had implemented membership, worked on some db tables, etc...

Today I go to open the Data Connection to the SQL Express db thru the VS
interface and I get this error:

An error has occurred while establishing a connection to the server. When
connection 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 - Erro Locating Server/Instance
Specified)

I hit OK and the db does not show up.

Any ideas what could be causing this?

Does it matter in my web.config that I added this?
<membership defaultProvider="CustomizedProvider">
<providers>
<add name="CustomizedProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0" />
</providers>
</membership>

The LocalSqlServer is defined in the web.config as this:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrate­d
Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

I don't know why it was working before, try to check this
http://www.sql-server-performance.com/faq/sqlviewfaq.aspx?faqid=143

to see if you have the same configuration for the SQL
 
J

Juan T. Llibre

re:
!> Does it matter in my web.config that I added this?

Yes.

Change the name of the [ connectionStringName="LocalSqlServer" ]
which you inserted, to any other name you like, and define a custom
connection string for CustomizedProvider.

By creating a new default Provider, you annulled the existing default provider.
 
C

Cowboy \(Gregory A. Beamer\)

Turn on SQL Browser to make sure you can get a remote connection. You also
have to make sure you have a protocol other than the default local provider
(managed?) selected using the configuration tool. After that, you will be
fine.
 
V

VB Programmer

Thanks everyone for your responses.

I ended up rebooting and everything works once again.

The good old reboot solution! Eeeeeek!!!

Thanks everyone. You all are awesome.
 

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

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,516
Members
44,984
Latest member
PeakCBDGummiesReview

Latest Threads

Top