Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

VS error - SQL Server not allow remote connections

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
VB Programmer - 02 Jul 2007 21:39 GMT
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>
Alexey Smirnov - 02 Jul 2007 22:03 GMT
On Jul 2, 10:39 pm, "VB Programmer" <donotemai...@somewhere.com>
wrote:
> 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...
[quoted text clipped - 32 lines]
>       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
Juan T. Llibre - 02 Jul 2007 22:09 GMT
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.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
>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...
[quoted text clipped - 28 lines]
>      providerName="System.Data.SqlClient" />
>  </connectionStrings>
Cowboy (Gregory A. Beamer) - 02 Jul 2007 22:10 GMT
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.

Signature

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************

>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...
[quoted text clipped - 32 lines]
>      providerName="System.Data.SqlClient" />
>  </connectionStrings>
VB Programmer - 02 Jul 2007 22:41 GMT
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.

> 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
[quoted text clipped - 37 lines]
>>      providerName="System.Data.SqlClient" />
>>  </connectionStrings>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.