Asp.Net membership via ASP.NET Website Administrator Tool
- by luppi
I created a database with aspnet_regsql, the database was created in sql sever 2008 and not in data folder in my project (do I need to move it to the folder manually?).
Next, in Web Site Administration Tool I went to provider section and clicked don Test button.
I got an error:
Could not establish a connection to
the database. If you have not yet
created the SQL Server database, exit
the Web Site Administration tool, use
the aspnet_regsql command-line utility
to create and configure the database,
and then return to this tool to set
the provider.
Maybe I need to set something in a web.config, like membership settings or connection strings (or ASP.NET Website Administrator Tool should create those settings for me)?
Update:
Maybe it happens because I am using SQL server 2008 full and not express?
Update 2:
After setting membership section and connection string to my aspnetdb database in Web Site Administration Tool I've opened security-Security Setup Wizard-Define Roles (stage 4) I got this error:
An error was encountered. Please return to the previous page and try again.
The following message may help in
diagnosing the problem: Unable to
connect to SQL Server database. at
System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean
isMembership, String methodName,
Object[] parameters, Type[]
paramTypes) at
ASP.security_wizard_wizardpermission_ascx.OnInit(EventArgs
e) at
System.Web.UI.Control.InitRecursive(Control
namingContainer) at
System.Web.UI.Control.InitRecursive(Control
namingContainer) at
System.Web.UI.Control.InitRecursive(Control
namingContainer) at
System.Web.UI.Control.InitRecursive(Control
namingContainer) at
System.Web.UI.Control.InitRecursive(Control
namingContainer) at
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint)