Separting the User name from the Machine name in User.Identity.Name
string userNameWithMachineName = User.Identity.Name;
string userNameWithoutMachineName = System.IO.Path.GetFileName(userNameWithMachineName); HighOnCodingWanna get high! ...edirectory user created on AD Full name name, but want logon name
I have installed the AD driver sucessfully, and when I create accounts in
the AD, an eDirectory user is created with either "full name" or "display
name" (eg "CN=Fred Bloggs")
I must have chosen this opten when installing it, however wondering now
what is the easiest way to change back to creating the eDirecory user
based on logon name (eg "CN=fbloggs") ?
> I have installed the AD driver sucessfully, and when I create accounts in
> the AD, an eDirectory user is created with either "full name" o...global user name change & banned user names
As part of my rollout of DNN 3.0, I'd like to change the default naming for the super user accounts. Specifically the admin & host user names. In addition, once these are renamed, is it possible to add in a "banned list" of user names? I.e. I don't want someone to come along and create an account called host or admin/administrator.
sadly, you can't change usernames (this is a limitation of the microsoft memberrole functionality - see http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=815100 for some more details). You can however uncheck the Aut...difference between HttpContext.Current.User.Identity.Name and User.Identity.Name
Q1. what is the difference between
1. HttpContext.Current.User.Identity.Name;and 2. User.Identity.Name
Q2.i'm using asp.net 2.0.
i'm using the following code to authenticate
FormsAuthentication.RedirectFromLoginPage(strEMail, false); Response.Redirect("web/ra.aspx");
my main web.config has
<authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="back.htm" protection="All" &n...What has to happen after login before Page.User.Identity.Name contains the user name?
I am using Membership Services in my new ASP.NET 3.5 app. I want to redirect the user to a page where he can enter various personal details if he has not yet done this. I put some VB.NET code in the LoggedIn event for my Login control that depends on the availability of the current user name in Page.User.Identity.Name but this reference is Nothing at this stage in the process. Page.User.Identity.Name works fine on other pages. When exactly is Page.User.Identity.Name loaded with the name of the current user?David
The authentication process hapen like this...
1-User request a secur...Can not get user name from HttpContext.Current.User.Identity.Name
I have tried to use HttpContext.Current.User.Identity.Name to get window user account. However, from debugger, for a long time ago I saw my window user name. But now, I did not see my window user name (from debugger) with the same code and same function call.
Please help. Was I doing something wrong? Or any special settings on web.config/machine.config or project to make it work??? I'm stuck
Thanks a lot
well, you have to have windows integrated authentiction enabled in IIS, IIRC.RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unre...User.Identity.Name returns email address instead of user name
I have modified the login control so that the user logs in using their email instead of their user name. Here is my code:Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
Dim email As String = Login1.UserNameDim userName As String = Membership.GetUserNameByEmail(Login1.UserName)Dim userInfo As AdditionalUserInfo = New AdditionalUserInfo
If Membership.ValidateUser(userName, Login1.Password) = True ThenDim isFirstTime As Boolean = userInfo.GetUserInfo(userName).IsFirstTime
If isFirstTi...User.Indentity.Name reports previous account name for renamed AD user
We're experiencing an odd result when querying User.Identity.Name in an ASP.NET 2.0 app configured for Windows Authentication. The scenario:
A user's AD account name was incorrectly spelled, so the account was renamed in Active Directory. For example - Joe Van Zoon [uname = MyDomain/jvanzoon] was renamed to Joe Van Zane [uname = MyDomain/jvanzane]. Joe now logs into an SSL VPN using his new name "jvanzane", and navigates to the application. The system access logs, which acquire the login name from User.Identity.Name, report that "MyDomain/jvanzoon" [the previous...How to Add an User Name only if the User Name Doesn't Exist in the Database
I have a form where users create user names. I'd like for the user to see a message that the user name already exists if it exists in the database. But I'm not sure how to do this in ASP.Net.In Classic ASP, I used the following code:
Error = False
'Loop through all the records in the recordset to check that the user name is not already in the database
Do While NOT rs2.EOF
'Check to see if the database already has ...Comparing a user's name/email to membership user name/email
I want to compare a user's name and email that he/she has entered. If it is correct I want to send an email to the Admin to let them know that they need their password reset. I have the following but for some reason it keeps hitting the else statement:
If txtUserName.Text.Length > 25 Then
lblOutput.Text = "User's Name is too long!"
ElseIf txtEmail.Text.Length > 45 Then
lblOutput.Text = "User's Email is too long!"
Dim strUserName As String = Trim(txtUserName.Text)
Dim strEmail As String = Trim(txtEmail.Text)
Dim mu As MembershipUser = M..."Please enter a different user name" error when the user name is unique
I am using a blank CreateUserWizard and am getting this error when using unique usernames that should work.
In the configuration i checked and the user is actually being added, and can login after this but the error message shouldn't be there.
Does anyone know what might be causing this?
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<asp:CompleteWizardStep ID="CompleteWizardStep1" ...Problem in getting logged in user Name for ASPX page with (even with this.User.Identity.Name)
Hi friends, I am creating an application that takes current logged in user and displays on the page itself. for this I am getting the user name in PageLoad function by using this.User.Identity.Name and then storing the value in a hidden variable for aspx page. I am using this hidden variable to display the name of the user. I am using Windows authentication for this. Now problem that I am getting is that when multiple user launch the application from different machine and if they click simultaneously, name of one user appears on the paged displayed on the machine of ot...Culture name 'fr_fr' is not supported. Parameter name: name
In my web application, I don't use localization. Howerver, sometime I have this message :
Culture name 'fr_fr' is not supported. Parameter name: name
Pile : at System.Globalization.CultureInfo.CreateSpecificCulture(String name) at Microsoft.Web.Globalization.AtlasCultureInfo.Create(String cultureName) at Microsoft.Web.Globalization.GlobalizationHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSync...Culture name 'en_us' is not supported. Parameter name: name
I keep getting this error on my site. Any advice on how to fix this issue? I'm using the June CTP.
Culture name 'en_us' is not supported. Parameter name: name
at System.Globalization.CultureInfo.CreateSpecificCulture(String name) at Microsoft.Web.Globalization.AtlasCultureInfo.Create(String cultureName) at Microsoft.Web.Globalization.GlobalizationHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.Call...