PC Review


Reply
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average.

Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified)

 
 
hfk0
Guest
Posts: n/a
 
      27th Mar 2006
Hello,

I'm a newbie here and was wondering anyone could help me with this.

I have a simple ASP.NET 2 web application running perfectly fine with
IIS and SQLServerExpress installed locally on my WinXP as a testing
server (I created the app in Visual Studio.NET 2005).

When deploying this app on the production server (running Win2000
Server, IIS and SQLServerExpress 2005), I'm getting the following
message when calling an aspx data-bound page from a browser:

An error has occurred while establishing a connection to the server.
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)

On the production server, I have the SQLServerExpress installed locally
on C: drive and the database is located on D: drive (on the same
directory as the app).

Connection string used in the webconfig file:
connectionString="Server=SERVERNAME\SQLEXPRESS;AttachDbFilename=D:\Inetpub\App_Data\registration.mdf;Database=registration;Trusted_Connection=yes;"
providerName="System.Data.SqlClient"

Does anyone know how to solve this issue? Any help would be greatly
appreciated.

Thanks,
Harry

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      27th Mar 2006
Networking protocols are disabled by default in SQL Server Express.

If someone simply installs Express and chooses all the defaults, SQL Server Express will only
be able to have connections originating on the local machine where SQL Server is installed.

You need to expressly enable networking protocols on the production server.

Follow the instructions outlined at :

http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx
and
http://forums.microsoft.com/MSDN/Sho...71795&SiteID=1




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"hfk0" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I'm a newbie here and was wondering anyone could help me with this.
>
> I have a simple ASP.NET 2 web application running perfectly fine with
> IIS and SQLServerExpress installed locally on my WinXP as a testing
> server (I created the app in Visual Studio.NET 2005).
>
> When deploying this app on the production server (running Win2000
> Server, IIS and SQLServerExpress 2005), I'm getting the following
> message when calling an aspx data-bound page from a browser:
>
> An error has occurred while establishing a connection to the server.
> 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)
>
> On the production server, I have the SQLServerExpress installed locally
> on C: drive and the database is located on D: drive (on the same
> directory as the app).
>
> Connection string used in the webconfig file:
> connectionString="Server=SERVERNAME\SQLEXPRESS;AttachDbFilename=D:\Inetpub\App_Data\registration.mdf;Database=registration;Trusted_Connection=yes;"
> providerName="System.Data.SqlClient"
>
> Does anyone know how to solve this issue? Any help would be greatly
> appreciated.
>
> Thanks,
> Harry
>



 
Reply With Quote
 
 
 
 
hfk0
Guest
Posts: n/a
 
      27th Mar 2006
Hi Juan,

I did enable TCP and name pipes for both local and remote connections,
but still no luck.

I've searched all posts related to this issue in this group but still
haven't found a solution yet.

I'm only using windows authentication on the production server and I
can't even access it there, let alone remotely. Could it be that I'm
missing something on the connection string? I've also allowed
permission to everyone (just for the sake of testing it) on the folder
where the database resides, which is on drive D:. Could this be a
problem as well?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: SQLEXPRESS 2005 Connection Error Belu33fr Microsoft Access ADP SQL Server 6 24th Feb 2009 09:25 PM
Error when connecting to SQLExpress Earl Microsoft ADO .NET 6 8th Jan 2007 08:23 PM
Security programs 2005 - , Firewall programs 2005 -, Antivirus programs 2005 -, APPDEV DOT NET SECURITY, Linux Security and Firewall programs 2005 -, CiscoWorks ( CW ) Security programs 2005 - , futa Microsoft Access Security 3 2nd Mar 2005 05:04 AM
Security programs 2005 - , Firewall programs 2005 -, Antivirus programs 2005 -, APPDEV DOT NET SECURITY, Linux Security and Firewall programs 2005 -, CiscoWorks ( CW ) Security programs 2005 - , futa Anti-Virus 0 25th Feb 2005 02:30 PM
McAfee 2005 All In One, McAfee AntiSpyware V1.0 2005, McAfee Personal Firewall Plus V6.0 2005, McAfee QuickClean V5.0 2005, McAfee SpamKiller V6.0 2005, McAfee VirusScan V9.0 2005, new !, other code_fu Anti-Virus 0 1st Oct 2004 11:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:57 AM.