Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6253269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:57:30+00:00 2026-05-24T13:57:30+00:00

I am trying to get my custom CREATEUSER to work but I think I’m

  • 0

I am trying to get my custom “CREATEUSER” to work but I think I’m having problems in my web.config. Thanks to help here, I’ve gotten the MEMBERSHIP section written but my MEMBERSHIP.CREATEUSER command is failing to logon to the database. The error is, “Cannot logon to the default database.” I’ve added a connection string and the name is in my section. But I’m stuck.

Here is the code-behind file for creating the user:

        protected void submit_Click(object sender, EventArgs e)
        {

                Membership.CreateUser(userName.Text, passwdConfirm.Text, email.Text);

        }

And, here is my Web.config file.

<configuration>

  <connectionStrings>
      <add name="FVTCEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=SFP;attachdbfilename=H:\ASP.Net\FVRG\FVRG\App_Data\FVTC.mdf;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
      <add name="dbMembership" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=H:\ASP.Net\FVRG\FVRG\App_Data\ASPNETDB.MDF;User Instance=true" providerName="System.Data.SqlClient" />
  </connectionStrings>
    <system.web>
        <authorization>
            <allow roles="ADMIN" />
            <allow roles="GUEST" />
        </authorization>
        <roleManager enabled="true" />
        <authentication mode="Forms" />
        <compilation debug="true" targetFramework="4.0" />

      <membership>

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

      </membership>
    </system.web>

  <appSettings>
    <add key="DatabaseConnection" value="Data Source=.\SQLEXPRESS;AttachDbFilename=H:\ASP.Net\FVRG\FVRG\App_Data\FVTC.mdf;Integrated Security=True;User Instance=True" />
  </appSettings>
</configuration>

thanks in advance for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:57:32+00:00Added an answer on May 24, 2026 at 1:57 pm

    That error typically arises because of the account being used to access the database. Each account setup in the database is given a default database, and the default database setup for this user either does not exist, or the user does not have access to it. This has to be done on the database server.

    HTH.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get custom namespaced events to work as described here: http://docs.jquery.com/Namespaced_Events But
I'm trying to get a custom template tag to work but am having some
I'm trying to create a custom property for my web part, but can't get
I'm trying to get a custom handler to work for a specific URL (or
I'm trying to get custom relationship names to work in Mongo. A collage is
Im having issues trying to get a custom snapin to display in the Add/Remove
I am currently trying to get my parser delegates to work with a custom
Trying to get this custom pager to work for jQuery Cycle. I want the
I'm trying to get this simple PowerShell script working, but I think something is
I am trying to get custom data from my wordpress database, but my knowledge

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.