CreateUserWizard control having problem with aspnetdb database

.net , asp.net Arlington, United States
  • 10 years ago

    hi,

    i have sqlserver express set up on my machine and i am using the default AspNetSqlMembershipProvider provided by .Net 2.0. and my application uses forms authentication

    I started out with a CreateUserWizard. when i run my application aspnetdb.mdf is created in App_data folder and my CreateUserWizard says that the user has been added.

    But the problem is 

    1) when i try to open the database thru my database explorer (Visual studio 2005) it says "Failed to generate a user instance of SQL Server due to failure in the starting process for the user intance. The connection will be closed"

    2) Also when i try using SqlServerManagement studio i can't see  any database called aspnetdb  when i connect to my SqlServerExpress. however i can see that aspnetdb.mdf is being created in my App_data folder.

     

    my machine.config has this

    <membership>

          <providers>
            <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />


          </providers>


        </membership>

     

    <connectionStrings>
        <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
      </connectionStrings>

     

    my web.config file has forms authentication  

    <authentication mode="Forms">
          <forms name=".ASPXAUTH" loginUrl="Login.aspx" protection="All" timeout= "30" path="/" requireSSL="false" slidingExpiration="true" cookieless= "UseDeviceProfile" />
        </authentication>



     

    can somebody help me

    thanks

    Yojimbo

  • 10 years ago

    You may be getting this error because sqlserver express is not running - installed but stopped. You can configure it to start automatically when your machine turns on using the service area tool. You may have the sqlServer quick launch icon (bottom right of screen) that will start stop it but I'm not sure this comes with express.

    Regards

    Brin

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook