default member database

Last post 03-27-2007 7:09 AM by XiaoYong Dai – MSFT. 2 replies.

Sort Posts:

  • default member database

    03-19-2007, 9:02 PM
    • Loading...
    • leeplatt
    • Joined on 10-30-2006, 3:33 PM
    • Aberdeen
    • Posts 30

    Hi everyone,

    Im creating a membership website in visual web developer 2005 express and im using the website administration function to set up my membership roles etc. so im using the default database thats created named aspnet.mdb found in the database explorer. does anyone know the code i put in the connection string in the web.config file to link the database to my pages so i can publish it to my website, im using vb code.

    thanks

    Lee

  • Re: default member database

    03-20-2007, 12:52 AM
    Answer
    • Loading...
    • Liming
    • Joined on 01-09-2006, 8:21 PM
    • Mclean, VA
    • Posts 985
    you can see that in your IIS, ASP.NET 2.0 configuration Tool, but just of the heck of it, it's

    data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true

  • Re: default member database

    03-27-2007, 7:09 AM

    Hi leeplatt 

    If you want to Configuring membership provider by connectionString, please  open the web.config file of publish website and add the following markup

    <membership defaultProvider="mymembershipprovider">

      <providers>

        <clear/>

        <add name="mymembershipprovider"

             type="System.Web.Security.SqlMembershipProvider, System.Web,

              Version=2.0.0.0, Culture=neutral,

              PublicKeyToken=b03f5f7f11d50a3a"

             connectionStringName="LocalSqlServer"/>

      </providers>

    </membership>

     

    <connectionStrings>

      <add name="LocalSqlServer" connectionString="Data Source=sql2005;Initial Catalog=northwind;Integrated Security=True" providerName="System.Data.SqlClient" />

    </connectionStrings>

     

    Hope it helps

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter