Help setting up SQL Express as Membership Provider (ASP.NET 2.0 beta 2)

N

Nate Hekman

[Cross-posted to the ASP.NET Security forum on forums.asp.net, but that
forum is moderated and I really need an answer soon!]
I'm trying to set up a Membership/Role Provider for an ASP.NET 2.0 beta 2
site using SqlMembershipProvider, and am having problems configuring SQL
Server.

I'm comfortable with ASP.NET but very new at databases, so please help me
out on the database side!

When I run aspnet_regsql I get this 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: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.
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 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(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'm using the default installation of SQL Server 2005 Express as it was
installed automatically along with Visual Studio 2005. On the third page of
the aspnet_regsql wizard I didn't really know what kind of authentication to
use so I've tried Windows authentication as well as SQL Server
authentication (but what username/password should I use? How do I set up
users for a database that hasn't been created yet?) and get the same error
in both cases.

The SQL Server Configuration Manager shows that "SQL Server (SQLEXPRESS)" is
Running, but "SQL Browser" is Stopped. Under "Protocols for SQLEXPRESS",
"Shared Memory" is Enabled but all others are Disabled.

I don't know where to start in debugging this. All the documentation and
blogs I read about setting up SqlMembershipProvider just say to run the
aspnet_regsql wizard, they don't talk about having to do any kind of setup
or configuration of the SQL Server installation first.

Any help is appreciated! Thank you.



Nate Hekman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top