473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

ASP.NET 2.0 deployment (w/ SQL Srvr 2005) error

I have the following setup:
1. ASP.NET 2.0 web app hosted on a web server (inetpub directory
hosting physical files of the web site on a different drive name, E:
than the SQL Server Instance, which is on C:)
2. SQL Server on the same server, with security settings enabling
ASPNET group and groups containing users allowed to interact with the
website added to SQL Server Instance security settings.
3. Impersonation = true, i.e. ASPNET worker process will impersonate
the user who has been authenticated by IIS

I am continiously getting 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: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
The stack trace and event log is at the end of this post.
I tried the following:
1. enabled TCPIP and Pipes for remote connection via the SQL Server
Configuration Manager
2. enabled remote and local connections via the SQL Surface area
Configuration (TCPIP and named pipes)
3. totally disabled the firewall (even if it is enabled, both the
sqlbrowser, and sqlserver are added as exceptions)
4. enabled the SQL Server Browser Service (to start automatically)
I've tried doing everything i came across on the net.
Nobody seems to have a solution but a lot of people have encountered
this problem.
If anybody out there does have a solution, PLEASE reply to this post.
Thanking you in advance
Part of the stack trace:
--------------------------------
[SqlException (0x80131904): 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)]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +734995
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObjeÂ*ct
stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner,
String protocol, SqlInternalConnectionTds connHandler, Int64
timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
+820
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnectioÂ*n
owningObject, SqlConnectionString connectionOptions, String
newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentiÂ*ty
identity, SqlConnectionString connectionOptions, Object providerInfo,
String newPassword, SqlConnection owningObject, Boolean
redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptÂ*ions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection owningConnection) +130
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConneÂ*ction
owningConnection, DbConnectionPool pool, DbConnectionOptions options)
+28
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +496
Part of the Event Log (Application)
------------------------------------------------
Process information:
Process ID: 5600
Process name: w3wp.exe
Account name: EUSRCMW309\IWAM_EUSRCMW309
Exception information:
Exception type: SqlException
Exception message: 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)
Request information:
Request URL: http://138.85.90.253/psdb/main.aspx
Request path: /psdb/main.aspx
User host address: 138.85.90.253
User: EAMCS\EUSJESadm
Is authenticated: True
Authentication Type: Negotiate
Thread account name: EUSRCMW309\IWAM_EUSRCMW309

May 4 '06 #1
1 4707
I'll reply to my own post.

I was on the phone with MSDN support for over 3 hours before we figured
it out. The connection string was ok. The problem was with a web part
that I was using in the Master page.

<asp:webpartmanager id="WebPartManager1" runat="server"
Personalization-Enabled="false" />
I was using the WebPartManager to display some data in the master page,
based on some information in the Session populated by clicking on a
GridView row. However it seems that by default, if you don't disable
'Personalization-Enabled' attribute, it is true. In that case, it will
try to locate the DB in SQL Server 2005 default to personalization
(which of course I had not set up using the script supplied). Note: I
had nothing to do with personalization in my web app. All I wanted to
do was to use the web part to display some data.
So when I disabled this attribute, everything started working properly.
I tried all permutation and
combinations of connection strings before I finally decided to make a
udl file on my desktop, connect to the DB, and then copy the string
created by it. We then ran a script on the website that Microsoft
support gave to make sure that everything was ok in terms of the
connection string. The finally, we homed in on the problem by looking
at the stack trace, which continiously gave a call to Personalization
api that was erroring out. That's how we homed in on the problem.
So lesson learnt. If you use WebParts in a website, Personalization is
enabled by default. To make sure we don't error out, we have to switch
it off.
"John Shadel" wrote:
I have the following setup:
1. ASP.NET 2.0 web app hosted on a web server (inetpub directory
hosting physical files of the web site on a different drive name, E:
than the SQL Server Instance, which is on C:)
2. SQL Server on the same server, with security settings enabling
ASPNET group and groups containing users allowed to interact with the
website added to SQL Server Instance security settings.
3. Impersonation = true, i.e. ASPNET worker process will impersonate
the user who has been authenticated by IIS

I am continiously getting 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: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
The stack trace and event log is at the end of this post.
I tried the following:
1. enabled TCPIP and Pipes for remote connection via the SQL Server
Configuration Manager
2. enabled remote and local connections via the SQL Surface area
Configuration (TCPIP and named pipes)
3. totally disabled the firewall (even if it is enabled, both the
sqlbrowser, and sqlserver are added as exceptions)
4. enabled the SQL Server Browser Service (to start automatically)
I've tried doing everything i came across on the net.
Nobody seems to have a solution but a lot of people have encountered
this problem.
If anybody out there does have a solution, PLEASE reply to this post.
Thanking you in advance
Part of the stack trace:
--------------------------------
[SqlException (0x80131904): 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)]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +734995
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObjeÂ*ct
stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner,
String protocol, SqlInternalConnectionTds connHandler, Int64
timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
+820
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnectioÂ*n
owningObject, SqlConnectionString connectionOptions, String
newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentiÂ*ty
identity, SqlConnectionString connectionOptions, Object providerInfo,
String newPassword, SqlConnection owningObject, Boolean
redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptÂ*ions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection owningConnection) +130
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConneÂ*ction
owningConnection, DbConnectionPool pool, DbConnectionOptions options)
+28
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) +496
Part of the Event Log (Application)
------------------------------------------------
Process information:
Process ID: 5600
Process name: w3wp.exe
Account name: EUSRCMW309\IWAM_EUSRCMW309
Exception information:
Exception type: SqlException
Exception message: 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)
Request information:
Request URL: http://138.85.90.253/psdb/main.aspx
Request path: /psdb/main.aspx
User host address: 138.85.90.253
User: EAMCS\EUSJESadm
Is authenticated: True
Authentication Type: Negotiate
Thread account name: EUSRCMW309\IWAM_EUSRCMW309

May 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sean | last post by:
Hi, I have my application running off my localhost and just transfered it to the production server. And when i ran my application, it came up with a Runtime Error. The server is an IIS and...
3
by: Boxman | last post by:
Hi I have been asked to migrate a long-standing and stable asp.net application from a W2k server on one NT domain on our intranet to another W2k server on another NT domain also on our intranet....
0
by: Lou Civitella | last post by:
When I try to add a connection within VS 2005 I get this error message: An unexpected error occurred in the .NET Framework Data Provider for SQL Server Mobile Edition. Please contact the Provider...
1
by: tomkarachris | last post by:
i try instal visual studio and i get Error 1402.Could not open key: HKEY_LOCAL_MACHINE\Software\Classes\ITIR.CmdInt.4\CLSID. Verify that you have sufficient access to that key, or contact...
1
by: Bryan Dickerson | last post by:
I have a small program that I built for Release mode and now when I try to run it from the VS 2005 IDE, I get an error/warning box that says: ------------------------------------------ The...
0
by: Stephen Plotnick | last post by:
I bought another laptop and installed my VB.2005. When I try to open a porject I get the following error. Error retrieving informationm from user database. Platform not found. Does anybody...
3
by: rote | last post by:
I'm trying to create a Website using VS 2005 on another server on the same domain. But i get error "The Web server does not have frontPage Server extensions installed Error" Any ideas what i...
3
by: bourgon | last post by:
I'm getting this, after upgrading from 2000 to 2005. Replication-Replication Distribution Subsystem: agent (null) failed. The subscription to publication '(null)' has expired or does not exist....
3
by: Wesly Tan | last post by:
Microsoft SQL 2005 Event id: 8309 Event Description: BACKUP LOG WITH TRUNCATE_ONLY or WITH NO_LOG is deprecated. The simple recovery model should be used to automatically truncate the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.