I'm using the asp:ChangePassword control. I would like to disable the ability for the user to enter a new username but the default shows the current user's UserName and allows editing. Ideally, I would be able to find the child control in the ChangePassword control that is the UserName textbox and set Enable=false.
i get all the error message in validation summary except one.the one is if i enter the wrong entry in old password textbox i am getting the error message in literal(ID=Failturetext).i want to show it in validation summary.is ther ary way to do this without the use of event "ChangePassword1_ChangePasswordError".
I would like to dynamically change the CancelDestinationPageURL and ContinueDestinationPageUrl at run-time.Firstly can I actually changes these at run-time and if so how what approach should i take?
I'm trying to limit what a user can see based on the roles that the user is in. I need the username to figure out what role they are in. I cannot, for the life of me, figure out how to get the username out of this loginView control. I have tried drilling down into the controls of the loginView but can only ever get this:
i have went with the standard membership method for validating and logging users into the application. i have added a column to the adpnet_Users table called customer_number.
once the user is logged in, i want to get the customer number for that user. what is the best / easiest / industry standard method of accomplishing this?
This may be very simple but I can not figure it out. I am using ASP.Net 3.5/Visual Studio 2010. I have placed a LoginName Control on the page and the login name is properly displaying. I am using forms Authentication and it is set up properly in the web config file. I simply want to insert the logged in username value into the database table so I can track who created the records. I am happy to be able to insert the UserID value. I assume the values are derived out of the aspnet_Users table. Hopefully someone can provide a way to do either. I am not a coder so giving me a quick try this answer won't help me much. I would need to really see the entire solution and code.
I have a CreateUserWizard control to be able to allow an anonymous user to create an account. Provided that all entered information is correct that the user enters, a new account is created for him/her. But also, when this user is created, I want to [b]also[/b] add the username to another table in my ASPNETDB database. How exactly can I "tap" into the event that creates a user and adds it to the appropriate tables (aspnet_Users, Members, etc.) and make it add the username to yet another table?
I have an ASP.Net application that uses the Membership Login Control. The thing is, we wanted to avoid giving our members more than they need to worry about, so we didn't want to have to make each a custom username. So the thing is, I want to make the Login Control display a DropDown List populated with a list of usernames as opposed to a text box.
I wanted to know how to add the feature- that user should be redirected to an error page where the error will be display, upon entery wrong username/password when trying to login through an asp.net login control?
1. how to redirect the user to an error page upon entering wrong username/password (from a login control which is placed on master page)?
2. how to pass the error to the error page so it can be displayed there?
I am using the ASP.NET membership provider controls (ChangePassword and PasswordRecovery) and they generally work just fine. Unfortunately they don't send any emails once the process is finished. I set up the SMTP server using the ASP.NET Configuration Website and it added the following lines to the web.config:
I also tried using the IP adress of the server instead of the domain. In addition to that I set the maildefinition properties on the used web controls:
<MailDefinition From="maildaemon@pagetailors.de" Subject="Your new password"> </MailDefinition>
Once I finish changing or resetting the password, the controls shows the success message. It does not show any errors but the mails are not sent. I also checked the SMTP log files on the server (it's a MailEnable server) but couldn't even find an attempt to send these messages. I am using a custom email helper class which manually sends an email using the following settings:
public static void SendEmail(string from, string to, string subject, string body) { SmtpClient mailClient = new SmtpClient(ConfigReader.GetStringValue("MailServer")); mailClient.Credentials = new NetworkCredential(ConfigReader.GetStringValue("MailUsername"), ConfigReader.GetStringValue("MailPassword")); MailMessage mailMessage = new MailMessage(from, to, subject, body); mailClient.Send(mailMessage); }
The values for mailserver, username and password read from the config file are the same as defined in the ASP.NET configuration tool. These mails are delivered successfully.
I am setting up membership and rolls for a small forum site that im working on. All this info is stored in the standard aspnetdb database. When a user is logged in and saves a post to the forum, their UserId is saved to a database in unique identifier format such as: b40e346d-0399-4bbb-90ee-c7c440726cfd. I want to set up a web service so that the name of the author of each post can be clicked on to retieve details about him or her. Rather than passing along the UserId of the author to the web service, I want to pass along the UserName and use that to retrieve the user's Id, which will in turn be used to query the database. I cant seem to find info on how to do this. I can find how to retrieve this kind of info for the current logged in user, but not any or all users in general.
I have two websites that run on two different servers and they both both have their own asp membership databases. One is http:// and one is https://. Is it possible to create a way that a user can access both websites while only entering username and password once? Or if the user logs onto the https site can I then redirect to the http site and auto authenticate?
In my Aspnet_Users table I have 2 user with same UserName. Membership.DeleteUser method only can delete user by username. How can I delete user by userid?
My intranet web application uses Forms Authentication. How do i get the Active directory domain nameusername of the logged in user. The IIS directory security settings for the app are:
Anonymous User Access : Ticked Integrated Windows Authentication : Ticked
I tried using the following but to no avail
System.Security.Principal.WindowsIdentity.GetCurrent().Name ----> returns NT AUTHORITYNETWORK SERVICE Request.LogonUserIdentity.Name -----> returns The username used for anonymous access
ineed to pass this information to an external application for the current user to gain access to the system. Can i untick Anonymous user access in IIS and continue using forms authentication? what are the other options.
using the Login control, which I just dragged and dropped from the toolbox, when the user successfully enters his or her username and password, I want the username text to be set as a session.