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.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection ) +734995
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje Â*ct
stateObj) +188
System.Data.Sql Client.TdsParse r.Connect(Boole an& useFailoverPart ner,
Boolean& failoverDemandD one, String host, String failoverPartner ,
String protocol, SqlInternalConn ectionTds connHandler, Int64
timerExpire, Boolean encrypt, Boolean trustServerCert , Boolean
integratedSecur ity, SqlConnection owningObject, Boolean aliasLookup)
+820
System.Data.Sql Client.SqlInter nalConnectionTd s.OpenLoginEnli st(SqlConnectio Â*n
owningObject, SqlConnectionSt ring connectionOptio ns, String
newPassword, Boolean redirectedUserI nstance) +628
System.Data.Sql Client.SqlInter nalConnectionTd s..ctor(DbConne ctionPoolIdenti Â*ty
identity, SqlConnectionSt ring connectionOptio ns, Object providerInfo,
String newPassword, SqlConnection owningObject, Boolean
redirectedUserI nstance) +170
System.Data.Sql Client.SqlConne ctionFactory.Cr eateConnection( DbConnectionOpt Â*ions
options, Object poolGroupProvid erInfo, DbConnectionPoo l pool,
DbConnection owningConnectio n) +130
System.Data.Pro viderBase.DbCon nectionFactory. CreatePooledCon nection(DbConne Â*ction
owningConnectio n, DbConnectionPoo l pool, DbConnectionOpt ions options)
+28
System.Data.Pro viderBase.DbCon nectionPool.Cre ateObject(DbCon nection
owningObject) +424
System.Data.Pro viderBase.DbCon nectionPool.Use rCreateRequest( DbConnection
owningObject) +66
System.Data.Pro viderBase.DbCon nectionPool.Get Connection(DbCo nnection
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