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;AttachDbFil
ename=D:\Inetpub\A
pp_Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
Does anyone know how to solve this issue? Any help would be greatly
appreciated.
Thanks,
HarryHi
Have you checked if you are allowing remote connections on your SQL Express
installation, by default these will be switched off.
Check the Remote Connections setting the the SQL Server 2005 Surface Aread
Configuration tool.
John
"hko" wrote:
> 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;AttachDbFil
ename=D:\Inetpub
\App_Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> Does anyone know how to solve this issue? Any help would be greatly
> appreciated.
> Thanks,
> Harry|||Hi John,
I did allow remote connections eventhough my database is on the same machine
as my web app, but no luck so far.
I used windows authentication for the database, and login to the machine
using admin account.
Another thing that I noticed is that when I go to SQL Server Configuration
Manager, under SQL Server 2005 Network Configuration, it says Protocols for
MSSQLSERVER, whereas on my dev machine it says SQLEXPRESS. When upgrading
from MSDE to SQLExpress i just chose the default instance name, but somehow
it's saying MSSQLSERVER.
I checked the databaseconnection through SQL Management Studio Express and
it works fine. Only when viewing the data-bound page on a browser that I get
the error message.
Do you think I should try to uninstall SQLServer Express and reinstall?
hko
"John Bell" wrote:
> Hi
> Have you checked if you are allowing remote connections on your SQL Expres
s
> installation, by default these will be switched off.
> Check the Remote Connections setting the the SQL Server 2005 Surface Aread
> Configuration tool.
> John
> "hko" wrote:
>|||Hi
If this is the default instance then change your connection string to only
be the servername.
If you want to change the installation from being the default instance you
will need to re-install.
John
"hko" wrote:
> Hi John,
> I did allow remote connections eventhough my database is on the same machi
ne
> as my web app, but no luck so far.
> I used windows authentication for the database, and login to the machine
> using admin account.
> Another thing that I noticed is that when I go to SQL Server Configuration
> Manager, under SQL Server 2005 Network Configuration, it says Protocols fo
r
> MSSQLSERVER, whereas on my dev machine it says SQLEXPRESS. When upgrading
> from MSDE to SQLExpress i just chose the default instance name, but someho
w
> it's saying MSSQLSERVER.
> I checked the databaseconnection through SQL Management Studio Express and
> it works fine. Only when viewing the data-bound page on a browser that I g
et
> the error message.
> Do you think I should try to uninstall SQLServer Express and reinstall?
> hko
> "John Bell" wrote:
>|||I only have one instance and that is the default instance, and this is my
connection string:
connectionString=" Server=HOMER\SQLEXPRESS;AttachDbFilename
=D:\Inetpub\App_Da
ta\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
Still something isn't right. Do you think I should probably re-install and
do fresh installation of SQL Express instead of upgrading (like what I did)?
"John Bell" wrote:
> Hi
> If this is the default instance then change your connection string to only
> be the servername.
> If you want to change the installation from being the default instance you
> will need to re-install.
> John
>
> "hko" wrote:
>|||Hi
Try the connection string:
connectionString=" Server=HOMER;AttachDbFilename=D:\Inetpub
\App_Data\registra
tion. mdf;Database=registration;Trusted_Connec
tion=yes;"
providerName="System.Data.SqlClient"
If you want a names instance then you would have to re-install and say that
you want a named instance and not the default instance.
John
"hko" wrote:
> I only have one instance and that is the default instance, and this is my
> connection string:
> connectionString=" Server=HOMER\SQLEXPRESS;AttachDbFilename
=D:\Inetpub\App_
Data\registration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> Still something isn't right. Do you think I should probably re-install and
> do fresh installation of SQL Express instead of upgrading (like what I did
)?
> "John Bell" wrote:
>|||Still not working. I tried different combination of connection strings but
kept getting the same error message.
I just want to use the default instance since there's only one database on
the machine.
I suspect there's a glitch during the upgrade process which causes SQL
server to locate the default instance. I was able to connect ok using
Management Studio Express.
This is the most frustrating thing ever to deal with...
"John Bell" wrote:
> Hi
> Try the connection string:
> connectionString=" Server=HOMER;AttachDbFilename=D:\Inetpub
\App_Data\regist
ration. mdf;Database=registration;Trusted_Connec
tion=yes;"
> providerName="System.Data.SqlClient"
> If you want a names instance then you would have to re-install and say tha
t
> you want a named instance and not the default instance.
> John
> "hko" wrote:
>|||Hi
A couple of suggestions:
Try using osql to try and connect, use both the server name and the IP
address and different user combinations.
Check that there is no blocking of the ports being used by a firewall (Try
telneting to the port!)
John
"hko" wrote:
> Still not working. I tried different combination of connection strings but
> kept getting the same error message.
> I just want to use the default instance since there's only one database on
> the machine.
> I suspect there's a glitch during the upgrade process which causes SQL
> server to locate the default instance. I was able to connect ok using
> Management Studio Express.
> This is the most frustrating thing ever to deal with...
> "John Bell" wrote:
>
Showing posts with label locally. Show all posts
Showing posts with label locally. Show all posts
Friday, March 9, 2012
Error connecting to SQLExpress 2005 locally
Sunday, February 26, 2012
Error connecting SQL instance
We are getting an error when we try to connect to one of our instances
locally. If we connect to the server remotely, we can manage it with no
problem. However, if we try to manage it from the server itself, we get the
following error:
A connection could not be established to SERVER/INSTANCE
Reason: SQL Server does not exist or access denied.
ConnectionOpen(Connect())..
Please verify SQL Server is running and check your SQL Server registration
properties (by right-clicking on the SERVER/INSTANCE node) and try again.
Our other instance works fine and the instance we are having a problem with
worked fine before, so we don't know what could be causing this. The server
is running Windows Server 2003 Standard.Are you trying to connect to the local boxes with NT or SQL security?
"DrewB" <DrewB@.discussions.microsoft.com> wrote in message
news:7634F5DF-AB13-4E3C-90D5-E45398E782EE@.microsoft.com...
> We are getting an error when we try to connect to one of our instances
> locally. If we connect to the server remotely, we can manage it with no
> problem. However, if we try to manage it from the server itself, we get
> the
> following error:
> A connection could not be established to SERVER/INSTANCE
> Reason: SQL Server does not exist or access denied.
> ConnectionOpen(Connect())..
> Please verify SQL Server is running and check your SQL Server registration
> properties (by right-clicking on the SERVER/INSTANCE node) and try again.
> Our other instance works fine and the instance we are having a problem
> with
> worked fine before, so we don't know what could be causing this. The
> server
> is running Windows Server 2003 Standard.
locally. If we connect to the server remotely, we can manage it with no
problem. However, if we try to manage it from the server itself, we get the
following error:
A connection could not be established to SERVER/INSTANCE
Reason: SQL Server does not exist or access denied.
ConnectionOpen(Connect())..
Please verify SQL Server is running and check your SQL Server registration
properties (by right-clicking on the SERVER/INSTANCE node) and try again.
Our other instance works fine and the instance we are having a problem with
worked fine before, so we don't know what could be causing this. The server
is running Windows Server 2003 Standard.Are you trying to connect to the local boxes with NT or SQL security?
"DrewB" <DrewB@.discussions.microsoft.com> wrote in message
news:7634F5DF-AB13-4E3C-90D5-E45398E782EE@.microsoft.com...
> We are getting an error when we try to connect to one of our instances
> locally. If we connect to the server remotely, we can manage it with no
> problem. However, if we try to manage it from the server itself, we get
> the
> following error:
> A connection could not be established to SERVER/INSTANCE
> Reason: SQL Server does not exist or access denied.
> ConnectionOpen(Connect())..
> Please verify SQL Server is running and check your SQL Server registration
> properties (by right-clicking on the SERVER/INSTANCE node) and try again.
> Our other instance works fine and the instance we are having a problem
> with
> worked fine before, so we don't know what could be causing this. The
> server
> is running Windows Server 2003 Standard.
Subscribe to:
Posts (Atom)