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

  • Home
  • SEARCH
  • 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 3238772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:53:33+00:00 2026-05-17T17:53:33+00:00

For reference here is what my web.config and code look like: <membership defaultProvider=SqlProvider userIsOnlineTimeWindow=15>

  • 0

For reference here is what my web.config and code look like:

<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <add name="SqlProvider"
          type="System.Web.Security.SqlMembershipProvider"
          connectionStringName="MySqlConnection"
          applicationName="/"
          enablePasswordRetrieval="false"
          enablePasswordReset="true"
          requiresQuestionAndAnswer="false"
          requiresUniqueEmail="true"
          passwordFormat="Hashed" />
      </providers>
 </membership>

VB code behind the fact:

Public Function Register(ByVal EncryptedName As String, ByVal EncryptedEmail As String) As String

Dim ret As String = ""

Try

            Dim Provider As MembershipProvider = Membership.Providers.Item("SqlProvider")
            Dim createStatus As MembershipCreateStatus
            Dim newUser As MembershipUser = Provider.CreateUser(EncryptedName, Membership.GeneratePassword(8, 1), EncryptedEmail, "Your favorite color?", "RED", True, Guid.NewGuid, createStatus)
            Select Case createStatus
                Case MembershipCreateStatus.Success
                    ret = "The user account was successfully created!"
                Case MembershipCreateStatus.DuplicateUserName
                    ret = "There already exists a user with this username."
                Case MembershipCreateStatus.DuplicateEmail
                    ret = "There already exists a user with this email address."
                Case MembershipCreateStatus.InvalidEmail
                    ret = "The email address provided is invalid."
                Case MembershipCreateStatus.InvalidAnswer
                    ret = "The security answer is invalid."
                Case MembershipCreateStatus.InvalidPassword
                    ret = "The password you provided is invalid. It must be seven characters long and have at least one non-alphanumeric character."
                Case Else
                    ret = "There was an unknown error; the user account was NOT created."
            End Select
        Catch ex As Exception
            Return "Server Error."
        End Try

        Return ret
    End Function

For reference sake this is a webservice that we’re using to allow users to register from our website and from desktop software. I don’t know if it is the desktop software that is causing this problem. Right now I’m getting an exception on the create new user line. The exception says ‘Login failed for ‘DOMAIN/user’ where DOMAIN is my work domain and user is my work login for my PC.

I’ve been looking around and found I needed to explicitly tell which provider to use (the provider checks out fine). I found a lot of samples where people simply used Membership.CreateUser but I found it wasn’t loading the correct login.

I also tried playing with the authentication tag in the web.config.

The simple idea is to programmatically register new users through a webservice so it can be used with website and multiple in house desktop software applications.

Thanks for any help.

  • 1 1 Answer
  • 3 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-17T17:53:34+00:00Added an answer on May 17, 2026 at 5:53 pm

    The membership provider is configured with a reference to a connection string. Have you confirmed it is a valid connection string? It sounds like your using the default one which will try to connect with integrated authentication. Also, the user being your login for your PC tells me either you’re running from debug or IIS’s application pool has an explicitly set identity.

    That probably won’t solve your problem, but, I wanted to offer what I could as I’ve had similar frustration in the past.

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

Sidebar

Related Questions

Here is my code that tries to get a custom configuration object from web.config:
I want to update web reference Url in web.config applicationSettings at runtime Here is
I looked in the mysql reference, and here, in stackoverflow, and looks like a
I modified my web.config to add a custom binding in order to increase the
I've consumed web services before (add reference > advanced > web reference). However, this
I am trying to set the mysql connection in web config file. Here is
In my Web.config file there are references to the following assemblies: <add assembly=UODOTNET, Version=2.2.5.7444,
Here is the reference tutorial Do I need to create django_login and edit the
Here's my DataGrid: // $ is a reference to `this` as it lies in
for reference http://vvcap.net/db/Bs03ucQSrylV5LBiWduY.htp here's a thumbnail of featured image of a post http://vvcap.net/db/_45qWkuQwluTrYF51tFn.htp here's

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.