Hi
I was following the steps for setting up SQL server 2005 for PWSK. When I came to this step:
1.
Double
click aspnet_regsql.exe in E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
2.
The
asp.net sql server wizard will start click next
3.
Choose
configure SQL Server and click next
4.
Select
Server and database; Give database a name, default name is aspnetdb.mdf
and choose type of authentication
5.
Confirm
setting and click next
The database pull down box said: <default> when i click on the downward arrow i get the following error message:
Failed to query a list of database names from the SQL server.
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]
So I followed the following steps to change the setting from local connection to local and remote connection:
| 1. |
Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration. |
| 2. |
On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections. |
| 3. |
On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.
Note Click OK when you receive the following message:
Changes to Connection Settings will not take effect until you restart the Database Engine service. |
| 4. |
On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service. |
And I selected both TCP/IP and name pipes, but when i go bak and
changed the <default> to some name i get the following error:
Setup failed.
Exception:
Unable to connect to SQL Server database.
----------------------------------------
Details of failure
----------------------------------------
System.Web.HttpException: Unable to connect to SQL Server database.
---> System.Data.SqlClient.SqlException: 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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at 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)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String
newPassword, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo,
String newPassword, SqlConnection owningObject, Boolean
redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
System.Web.Management.SqlServices.GetSqlConnection(String server,
String user, String password, Boolean trusted, String connectionString)
--- End of inner exception stack trace ---
at
System.Web.Management.SqlServices.GetSqlConnection(String server,
String user, String password, Boolean trusted, String connectionString)
at
System.Web.Management.SqlServices.SetupApplicationServices(String
server, String user, String password, Boolean trusted, String
connectionString, String database, String dbFileName, SqlFeatures
features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()
I really donno where I did wrong or what steps i'm missing. And I really am running out of ideas. Please help!!!! Thanks a lot
-yue