Setting up ASP.NET Configuration in Visual Studio 2005

Discussion in 'ASP .Net Security' started by Jibey Jacob, Jul 9, 2007.

  1. Jibey Jacob

    Jibey Jacob Guest


    I'm having trouble setting this up. I placed the following information in

    <membership userIsOnlineTimeWindow="20">
    <add connectionStringName="SqlServices"
    enablePasswordReset="true" requiresQuestionAndAnswer="true"
    passwordFormat="Hashed" applicationName="jibey.jacob"
    type="System.Web.Security.SqlMembershipProvider" />

    When I launch the ASP.NET Configuration wizard from Visual Studio, and flip
    to the Security tab, I can see one provider listed (I selected single
    provider for all site management), which is AspNetSqlProvider. The
    connnection string "SqlServices" exists in web.config. The problem is the
    wizard always comes back with an error that says "unable to establish a
    connection to the database".

    Before I placed all this information in web.config, I had started with a
    bare-bones web.config that VS2005 had created. And I created the membership
    database in SQL Server using aspnet_regsql.

    What am I doing wrong?

    Jibey Jacob, Jul 9, 2007
    1. Advertisements

  2. Jibey Jacob

    Jibey Jacob Guest

    There's just this one other thing that bothers me about this: how does the
    ASP.NET Configuration Wizard know which host and sql server instance name to
    look for?

    Jibey Jacob, Jul 9, 2007
    1. Advertisements

  3. Jubey,

    I think your problem is in the defaultProvider property which is not

    Quote: When specifying the membership Element (ASP.NET Settings
    Schema) section, you must specify the defaultProvider attribute. If
    you do not specify a membership Element (ASP.NET Settings Schema)
    section in your Web.config, the values from the machine configuration
    are used and the SqlMembershipProvider instance named
    AspNetSqlProvider is established as the defaultProvider.

    Hope this helps
    Alexey Smirnov, Jul 9, 2007
  4. Jibey Jacob

    Jibey Jacob Guest

    Yes, it helped. I also had to create separate providers for roles and
    memberships and I had to remove the default AspNetSqlProvider as a membership


    Jibey Jacob, Jul 9, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.