Groups | Blog | Home
all groups > sql server programming > september 2007 >

sql server programming : An error has occurred while establishing SQL CONNECTION


Norman Yuan
9/18/2007 1:29:28 PM
Obviously, your web app needs to access a SQL Server database. So, you have
to make sure on tow ground:

1. Do you have a required SQL Server setup correctly (on the same computer
as the web server, or on the other box?), does the server allow access form
other computer if it is not on the same box as the web server?

2. Which user account is used to run your web app? ("Network Service" on the
web server box, by default, by could be configured to use other local or
domain user account)? does the user account have access to the SQL Server
database?


[quoted text, click to view]
lautaro
9/18/2007 6:25:40 PM
Enviroment with Problem
SERVER 2003
SQL SERVER 2005
DEV C# .NET 2.0

I have a web application that works perfect on my dev machine. When I
publish it to my 2003 server it display this error

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: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)

This happens to me when I try to access some aspx pages that resides
inside of folder call "po". How ever there are no problems on any root
aspx files of my web application. The "po" folder has no config file
just 2 more folders for images and 4 aspx pages on the root of this
"po" folder. Those pages send info to the database.

Hope some one help me on this
Thanks
AddThis Social Bookmark Button