Security :: Creating A Session / Keep Getting A Blue Line Put Under "UserName"?
Feb 11, 2010
Is anyone able to tell my why i keep getting a blue line put under "UserName" (after the = sign), even though i have a textbox called "UserName" as part of the login control that comes with asp.
I have an application with a custom mebership (I'm still working on it). There is some funcionality in the application for asociating users. This means that (if already associated) one user could switch to some other user with just a click.
My question is:
Can I do a function that would allow me to authenticate one user without sending the password as a parameter?
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.
I don't believe the built-in membership saves username in session, does it? If I'm not mistaken it's saved in a cookie.I've implemented the ImageManager add-on for tinyMCE and trying to set the default folder for images based on authenticated user's username. Looks like out of the box, ImageManager allows this by getting the username from session.
I m very new in VS (ASP.NET) and using C# in code behind file. I want to define global variables to use in whole application. EXAMPLE
I want to save some information in LOGIN Page and display it in other pages line UserName or AccessRights etc. Is there anyway to do this without using Cookies and Seassion ?
I'm creating an LDAP class that contains a function that returns the managers username of the current user.
I know that I can use the "manager" attribute to return CN="name", OU="group", DC="company" etc.I specifically want the managers username, does anyone know if there is an attribute string that I can send to LDAP that specifically gets the managers username only? If not, is there an alternative method to do so?
I recently got a form to work with the "HttpContext.Current.User.Identity.Name.ToString" String. That basic idea was I needed a hidden form field so that each record submitted would include the UserName of the user logged in to the membership. However, whenever I try to create a custom query for the gridview, it doesn't submit. how I would go about doing this? Code as below:
I am building a simple search interface for one of our existing systems. I am using windows authentication. What I would like to do is grab the username of the logged in user via httpcontext.current.user into a session variable on page load and use it in various places on my page. My problem is that when i run my code in debug mode from visual studio it works fine. But when i try to run my code from the browser using localhost it does not work.
SELECT DISTINCT TblSections.SectionID, TblSections.Description FROM TblSections INNER JOIN UMG.Users ON TblSections.SectionID = UMG.Users.SectionID WHERE (TblSections.Description IS NOT NULL) AND (dbo.Users.LoginName = [@Session(UserName)]) ORDER BY TblSections.Description
I have problem in using Session name in the above BOLD WHERE clause.
I'm going to ask a user to login first, then when I'm going to save information I'm going to have to save the information and associate it with the logged in user.How should I handle this with session?
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.
I have created a test user/password on my web site. The intent is to have prospective clients login and try out the tool. Instead of telling them the userid/password of the test user, I'd like to tweak the Login wizard.
In the Load event, I was able to specify login1.UserName = "test user"
But when I try to specify the password, I'm told it is a readonly field. How can I 'force' a specific password? Or, how can I call the login event directly and pass the needed values?