I'm attempting to use the new login controls available in VS.NET 2008 for web development, but there seems to be no way to specify the database (default SQLExpress instance) in order to use the ASP.NET role-based security. The tutorials claim that this is done automatically, but neither is the database created automatically, nor is there any way I can find to see where it thinks the database is residing.
A local copy of SQLExpress 2005 was installed first, followed by the Visual Web Developer Express 2008 version on WinXP Pro SP2 w/ DotNetFW 2.0, 3.0, and 3.5 installed.
I don't see an area inside the web.config file to specify the database.
If I try to configure security (via the ASP.NET configuration pages), I get the following message:
"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database. "
On the [Provider] Tab, the page says that it is configured for "AspNetSqlProvider"
(I presumed that was a user, but there is no user on the system with that name)
When I try to "test" the provider, I get the following 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. "
I ran the command line utility and specified PI\SQLEXPRESS as the SQL2005 (the ONLY instance running on the machine, "PI"), logged in, typed in a new database name, and verified that the database was indeed created with all the correct tables in it VIA the SQL Server Management Express tool.
I'm not sure where I need to go now to point my ASP.NET app to the correct database for the role management and what "AspNetSqlProvider" means (a user? , a role?, a service?)
Start Free Trial