473,661 Members | 2,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Membership.Crea teUser without Question/Answer

In my application, new accounts must be created by an administrator--users
will not create their own. Ideally, the user could then log on and specify
their own password question and answer, and the administrator doesn't even
know what that question and answer is.

I thought I could do this since Membership.Crea teUser() includes an overload
that does not include question and answer arguments. However, when I use it,
I get the error "Invalid question-answer."

Can anyone suggest a better approach?

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Dec 18 '07 #1
2 6850
Change your Membership settings in web.config to not require a question &
answer.

On the provider, the attribute is:

requiresQuestio nAndAnswer="fal se"
"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:Ow******** *****@TK2MSFTNG P06.phx.gbl...
In my application, new accounts must be created by an administrator--users
will not create their own. Ideally, the user could then log on and specify
their own password question and answer, and the administrator doesn't even
know what that question and answer is.

I thought I could do this since Membership.Crea teUser() includes an
overload that does not include question and answer arguments. However,
when I use it, I get the error "Invalid question-answer."

Can anyone suggest a better approach?

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
Dec 18 '07 #2
Make sense. Thanks Scott!

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"Scott Roberts" <sr******@no.sp am.here-webworks-software.comwro te in
message news:eN******** ******@TK2MSFTN GP02.phx.gbl...
Change your Membership settings in web.config to not require a question &
answer.

On the provider, the attribute is:

requiresQuestio nAndAnswer="fal se"
"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:Ow******** *****@TK2MSFTNG P06.phx.gbl...
>In my application, new accounts must be created by an
administrato r--users will not create their own. Ideally, the user could
then log on and specify their own password question and answer, and the
administrato r doesn't even know what that question and answer is.

I thought I could do this since Membership.Crea teUser() includes an
overload that does not include question and answer arguments. However,
when I use it, I get the error "Invalid question-answer."

Can anyone suggest a better approach?

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
Dec 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3550
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the custom membership provider fine and removes the security question/answer fields as designated in the custom provider. The problem is that when I try to create a new user in the create user wizard by entering the info and pressing the 'create...
3
4913
by: Adam J Knight | last post by:
Hi all, I am in the process of creating a custom membership provider (ASP.NET 2.0): Currently I am inheriting from MembershipProvider which isn't a problem. However, the membership.CreateUser() methods signature doesn't seem relevant to my implementation. For example, i will be needing to store a users address details and not just
3
2021
by: VB Programmer | last post by:
I am getting this error: error BC30456: 'CreateUser' is not a member of 'Membership'. What does that mean? Here's my code. It seems correct (no squigglies, etc...) ' store it in db Dim result As System.Web.Security.MembershipCreateStatus Try Dim newUser As MembershipUser = Membership.CreateUser(Me.txtUsername.Text, Me.txtPassword.Text,
4
7901
by: Ron | last post by:
Hi, I have created a custom membership provider that i use to create certain types of user accounts that only require a User Name and Password nothing else this code below works great if i use the CreateUserWizard. But if i try and create the account on my own in code behind i keep getting a status back of. "InvalidAnswer" how can i properly handle this status and correct for it.
3
3277
by: ryan.mclean | last post by:
Hello everyone, I am wondering, can the membership provider be changed at runtime? Perhaps the connectionStringName? I would like to use a different database based on the server the site is on. I suppose that a custom provider could be used to accomplish this, is there another way?
3
1813
by: John | last post by:
Hi I have a web service asmx file in a sub folders of site app root folder. With in the web service I am trying to cerate the user as below; <WebMethod()_ Public Function CreateUser(ByVal Username As String, ByVal Password As String, ByVal Email As String, ByRef ErrMsg As String) As Boolean Dim newUser As MembershipUser = Membership.CreateUser(Username, Password,
4
7222
by: thomas | last post by:
Hello All, How to change the default Membership Provider during the runtime? I know I can reference any provider I want, e.g.: provider = Membership.Providers but the question is how to change the default one, so all those new, cool controls can start using the one I want. I can specify the provider for each of those controls, e.g.:
4
3261
by: AC | last post by:
Hi there. My asp.net 2.0 development website uses roles to control access to sections of my site, configured using the asp.net configuration tool, which is great. Except that isn't available once published on the public, third-party hosted site. So I need to be able to configure access through a new section of the site, available only to admins/developers, which I'm about to write. First off, I want to create a role in the database to...
3
1436
by: =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?= | last post by:
I use SQL Server Membership provider and my data are also stored in SQL Server. But the default user fields are not enough for my users info. So I created another Users table apart from aspnet_Membership. It has a PK(uniqueidentifier) to create the reference to aspnet_Membership table and my other info columns. Having read about the Custom Membership Provider in .NET help, it says that I should create a new object inherited from...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8542
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.