login failed because user's IsApproved is false for user's account

Hi

How can i detect if a user's login fails because their account is not approved yet (i.e IsApproved = false in Membership table)

I am using a templated login control and if the user's login fails for this reason all that happens is that the FailureText control is displayed.

How can i change the failure text if the user's account is not approved?

thanks

andrea

0
andieje
11/12/2006 2:13:45 PM
asp.net.security 27051 articles. 1 followers. Follow

1 Replies
1032 Views

Similar Articles

[PageSpeed] 4
Get it on Google Play
Get it on Apple App Store

Use

Membership.GetUser Function  
this function Return a hydrated  MembershipUser Object 
you can access its properties and check the validity 
see the link below 
  http://msdn2.microsoft.com/en-us/library/40w5063z.aspx

Regards,

Anas Ghanem.


Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensive,or any post that violates the website "TERMS OF USE"). -- Thanks!

0
anas
11/12/2006 3:42:50 PM
Reply:

Similar Artilces:

changes made from one user's webpart's page, effects all user's
 I am just doing this offline right now in Visual Web Developer Express 2008I created the login inonce in the memberpage area, people can modify their webpart page. I created several users to test this out.  I loaded it in a browser.When I make changes as logged in user "A" .  Then logout and login as user "B", user "B,s" webpart page has been changed to user "A".This goes true for whomever I log in as.  It changes for everyone.Is there something specific I need to do in order to get everyone's changes to be unique for them...

Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)
Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers. Which authentication mode is your Sql Server configured - MixedMode, Windows Authentication or Sql Server Authentication? Please refer to http://msdn2.microsoft.com/en-us/library/ms366351.aspx and http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx    Ple...

Unable to access user control's user control's function\property from another user control
Hi, I used to call an user control's user control function as stated below from my user control in ASP.Net 1.1 wucCompany.wucEmployee.GetEmployeeSomething() After migrating to ASP.Net 2.0, I am unable to use any properties/functions(even the public ones) of the user control's User control's from another user control.  The way I have to do is create property\function in wucCompany which calls the wucEmployee's property\function and call the wucDepartment.GetEmployeeSomething().Since I need to do this change in too many places, I can...

Cannot open database requested in login 'database'. Login fails. Login failed for user 'webuser'.
I am getting the following error from a previously working asp.net application Cannot open database requested in login 'fieldservice'. Login fails. Login failed for user 'webuser'. I checked the connection string dim myconn as sqlconnection=new sqlconnection("server=milkman;uid=webuser;pwd=xxx;database=fieldservice"), and it is the same as another application that is still working. I am able to use query anaylizer and connect to the db and run the query that is attempting with this information so I am lost. Anyone out there got any ideas? Thanks, Justin T...

Cannot open database requested in login 'sql'. Login fails. Login failed for user '\ASPNET'.
I am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen? Thanks for any help, Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'server\ASPNET'.Thank youJackxxx I thought i shold add that when this was on the development PC the database was named DataSQL. On the new PC it is DataSQL2, so I'm not sure why the error shows DataSQL. Thanks,Thank youJackxxx What are the contents of your connection string? Where is it stored? TerriTerri MortonE...

Gmail 'forgot your password?' Feature Lets Remote Users Flood a User's Secondary E-mail Account
Gmail 'forgot your password?' Feature Lets Remote Users Flood a User's Secondary E-mail Account http://www.securitytracker.com/alerts/2005/Jan/1012749.html *********************************************************** Quote *********************************************************** SecurityTracker Alert ID: 1012749 SecurityTracker URL: http://securitytracker.com/id?1012749 CVE Reference: GENERIC-MAP-NOMATCH (Links to External Site) http://cve.mitre.org/cgi-bin/cvename.cgi?name=GENERIC-MAP-NOMATCH Date: Jan 2 2005 Impact: Host/resource access via network Exploi...

how to change a user's mailbox but keep the user's GW id
We have a user whose email has a space between her first name and middle name, which cause the problem in sending out email or receive email from the outside the network. Can someone advise how and where I suppose to change her email name to a valid name like firstname.middlename.lastname@xxx.com from firstname middle.lastname@xxx.com? Thank you very much! On Tue, 23 Oct 2007 15:27:51 +0000, April wrote: Duplicate. -- Joe Marton Novell Support Forum SysOp Novell does not officially monitor these forums! Use the Internet override - in ConsoleOne, GroupWise Tab, Inte...

Error: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.
Hi, Im getting this error when attempting to retrieve data from an sql database. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'. Source Error: Line 13: objConn = New SqlConnection( "Server=LAB303-066\NETSDK; Database=projectAllocations; User ID=sa;Password=mypas...

Cannot open database requested in login 'dbName'. Login fails. Login failed for user 'machineName\ASPNET'
Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineName\ASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs. osql -E -S InstanceName -C -Q "sp_grantlogin 'computer\ASPNET'" osql -E -S InstanceName -d database ...

Cannot open database requested in login 'Portal'. Login fails. Login failed for user 'JAY\ASPNET'.
Guys, I've been beating my head with this. Please help. Let me see if I can explain. I'm running the IBuySpy Portal self install utility. It used to fail and say could not find SQL server, but after someone posted that you need to enable TCP/IP it has gotten further. Now, it will bring up a dos prompt and it looks like it tries to create the database. It errors our saying Could not add aspnet user to database: Cannot open database requested in login 'Portal'. Login fails. Login failed for user 'JAY\hawkswim32'. I looked at the output when it was installing the datab...

Cannot open database "DataBase" requested by the login. The login failed.Login failed for user 'User\ASPNET'.
hi all, i am having my asp.net project and database is in same system. in web.config i diclaire my connection string as <add name="MyWebConString" connectionString="Data Source=AIPL069\SQLEXPRESS;Initial Catalog=MyWeb;Integrated Security=True" providerName="System.Data.SqlClient"/> when i login application i got an error error is Server Error in '/MyWeb' Application. Cannot open database "MyWeb" requested by the login. The login failed.Login failed for user 'AIPL069\ASPNET'. Description: An unhandled exception...

Notes Driver: veto when user's fullname is the same as existing user's fullname
In the Notes Driver, I want to put the policy to veto when the current user's fullname is the same as existing user fullname is Lotus Domino Directory and and in eDirectory. How can I do the query to findout whether the user's fullname is the same as the existing ones or not. Please help.. Thanks Pattarawan. -- pattarawan pattarawan, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try one of the following op...

Cannot open user default database. Login failed. Login failed for user 'Server\Username'... again
I have been working for a few month on a project, when suddenly I can not access the local database I use for testing. Here are some details:Microsoft Visual Studio, C# application, The database is in the folder "App_Data," gets attached automatically, and is accessed using Windows authentication, and hence, no user accounts were created explicitely. Connection string:<add name="ASPNETDBConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="Sy...

Cannot open user default database. Login failed. Login failed for user 'KONTORET\ASPNET'.
Hi all I get the above error when i try to  open http://localhost/Beerhouse. This is what i have done:Opened the TheBeerHouse.sln in WWD and copyed the website to my http://localhost/BeerhouseIIS and SQL Experss is running.I am logged in as Administrator. It works fine when i run F5 in the orginal solution, but i want to publish it to my localhost. TIA   First, try detaching the database in Visual Studio (by right clicking on it). If that doesn't help, try deleting the database log file (it will be re-created automatically). Jos Jos Branders: First, try detaching ...

Web resources about - login failed because user's IsApproved is false for user's account - asp.net.security

Resources last updated: 12/29/2015 5:19:57 PM