Re: Membership

You need to setup the membership db... you need to execute aspnet_regsql.exe from the folder C:\Windows\Microsoft.NET\Framework\v2.0.50727 follow the setup wizard

Misbah Arefin

"Alexk@xxxxxxxxxxxxxxxx" <Alex.O.Koranteng@xxxxxxxxxxxxx> wrote in message news:eJsnP418IHA.3848@xxxxxxxxxxxxxxxxxxxxxxx
I recreated the first membership sample from Scott's membership series from 4guysfrom and got the following error. Any suggestions


Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'Alex-PC\test'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'Alex-PC\test'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

This is the listing for my web.config file
<configuration xmlns="";>

<!-- You should ALWAYS customize the Membership provider and specify an applicationName... see for more details... -->
<!--membership defaultProvider="CustomizedProvider">
<add name="CustomizedProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" applicationName="/" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0"/>

<!--The following code example shows how to configure an ASP.NET application to use the
SqlMembershipProvider provider to store and retrieve user account information.-->

<add name="SqlServices"
connectionString="Data Source=Alex-PC\SVAIO2005;Integrated Security=SSPI;Initial Catalog=aspnetdb;" />

<authentication mode="Forms"/>

<remove name="AspNetSqlProvider" />
<add name="SqlProvider"
applicationName="/" />
<compilation debug="true"/>




Relevant Pages