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

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



[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




.



Relevant Pages

  • Re: VS 2003 to VS 2005 problems
    ... When connecting to SQL Server 2005, this failure may be caused by ... useFailoverPartner, Boolean& failoverDemandDone, String host, String ... owningObject, SqlConnectionString connectionOptions, String newPassword, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Cant use forms authentication when using IIS
    ... serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 ... host, String newPassword, Boolean redirectedUserInstance, SqlConnection ... owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342 ... System.Web.Security.SqlMembershipProvider.CheckPassword(String username, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Login failed for user NT AUTHORITYNETWORK SERVICE.
    ... The login page comes up (using Membership with a db on Sql Server) and then ... Boolean redirectedUserInstance) +628 ... identity, SqlConnectionString connectionOptions, Object providerInfo, String ... newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Unable to Locate Server
    ... >> Boolean& failoverDemandDone, String host, String failoverPartner, String ... >> owningObject, SqlConnectionString connectionOptions, String newPassword, ... >>> trying to make a remote database connection while you think your ...
    (microsoft.public.sqlserver.setup)
  • Cant use Sql server when using forms authentication
    ... In this web site I have created the following files. ... serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 ... host, String newPassword, Boolean redirectedUserInstance, SqlConnection ... owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342 ...
    (microsoft.public.sqlserver.programming)