Web Forms :: Redirecting Users Based On User Account?
Feb 15, 2010
We would like to redirect a user to a different page based on his or her credentials.
In other words, if a user's credentials are authenticated, a user is presented with a dropdown list belonging to his/her group to select from.
So far, it doesn't matter what the user's credentials are, the user is not getting redirected.
[code]....
View 3 Replies
Similar Messages:
Jul 28, 2014
I have a web app Which Uses Forms Authentication.
One thing that we want to be able to do on Support is login to a specific users account Via our admin account.
We are using the standard asp.net membership authentication.
The idea would be for the support technition to be able to login using credentials like admin(<Troubled User>) using the Admin Account password
We are using a a Standard ASP.Login Control
The real Issue is that the Me.Page.User.Identity.Name is set to the value on the CtlLogin.Username Property. I need it to be the the Support Login?
Login Control
Code:
<asp:Login ID="ctlLogin" runat="server" DisplayRememberMe="False" Font-Names="Arial Rounded MT Bold" Font-Size="12pt" ForeColor="Black"
MembershipProvider="MembershipProvider" Width="100%" TitleText="" UserNameLabelText="User" VisibleWhenLoggedIn="False" RememberMeSet="True"
PasswordLabelText="Password" EnableTheming="False" Height="35px" >
[Code] ....
Validate User Script
Code:
Dim objstrSupUser As String = ""
'Load the user from the membership provider
Dim strUserName As String = ctlLogin.UserName
If ctlLogin.UserName.IndexOf("(") > 0 Then
objstrSupUser = Regex.Match(strUserName, "(([^)]*))").Groups(1).Value
[Code] ....
View 5 Replies
Nov 11, 2010
I have a user management section in which I have created two roles admin and user.the functionality is... admin can login in into user management wizard and can delete any other user. It is working fine. and here is the problem..I am logging as admin and after deleting myself i am able to navigate to any other page untill i logout. But what i need is once i am deleting my account i should not be allowed to navigate to any other page instead it has to be directed to login page.
View 8 Replies
Nov 28, 2010
When a user logs in, they are redireced to files within members folder. When a user happens to log in and gets redireced, there is the chance they will retype the default page address and go to the homepage, which is accessable to everyone. The issue is, the log in status control shows "Logout". how do I check if a user accesses the homepage, if they are logged in and if they are send them elsewhere. I've tried different codes, but not getting the result. Here is one code I tried...
[Code]....
View 4 Replies
Dec 30, 2010
On a membership website that every user has an acount how to give a user place or page in the way below: assume that website is [URL] then we have a user with acount Jimmy now I want to have a link like : [URL] that gives general information about jimmy to other users. one solution is to make a sub directory on root named jimmy and have an index.aspx file in that. it is space consuming and I do not want to do it. Is there any other briliant solution for this problem that for example I can use just one page and take jimmy as query string or something like that to show jimmy's information?
View 1 Replies
Feb 2, 2011
Do I just need to make a field for account type in my user account table? In a technical way, if(account type = admin) then the account would log as admin; otherwise, a user with less privileges.
View 7 Replies
Mar 20, 2010
I have tried looking everywhere but I can't seem to work out how to do the follow:
I am trying to make a page that will display the fields that are asscoiated with the current logged in user:
User name
Secret Question and Answer fields of the authenticated user,
Last Login date of that user
Last Password changed date of that user
When the account was created of that user.
Here is my code so far (I have not attached my code behind file because it is empty)
[Code]....
Also by default it does not display anything, so after the .aspx extension I add .aspx?UserId=1 and it displays the first record on the database. But if I change it to .aspx?UserId=2 or
.aspx?UserId=3 etc, it still displays the first record on the database. Why does it not display the next user name. (I am logged in with admin and it is displaying a user that is in another role group)
View 7 Replies
Sep 22, 2010
I am working on an internal application... i setup IIS 7 to use windows authentication since its behind the firewall and on the domain.. there is a "public" side.. and an "internal" side... if your not part of IT.. you should get the public side.. this is just informational.. my problem is that there is 1 or two pcs that are not on the domain and nobody is logged into them.. how can i just redirect anonymous users to another site?
everything i read says you can't use anonymous AND windows auth.. so my thought was to just redirect the anonymous users to another site.. how can you do that?
View 1 Replies
Aug 20, 2010
I've been able to create a cool little website, it's up and running with users logging in and out, I created roles so my administrative team can see sensitive data that's not available to regular and anonymous users.
Now they would like me to create a page specific to each user. For instance when user A logs in they are redirected to a page that has information that pertains to user A only (like a list of their benefits/ their remaining vacation time). This page needs to be accessible only to user A.
View 5 Replies
Mar 7, 2011
we have two identical websites. One located at apac.ourdomain.com and the other at eu.ourdomain.com. The only differences about these websites are one is hosted in Australia, and the other is in London. The databases they backed onto have identical schema, except one is in Australia, and the other is in London, each storing data related to our partners in the region.
What we want to do is implement some form of centralise landing page @ www.ourdomain.com using forms authentication. Once a partner logs on to www.ourdomain.com, we will redirect them to either the apac or the eu server. My challenge is how do I transfer the user credentials from the landing site to the regional site? By Credentials, I mean everything from their username to their roles / permissions. And once a user is redirected to the regional site, how do i get them back to the landing site should they required to modify their details?
I know I will need to have a centralised user details db for the landing site, but it is the communication to and from the regional site afterward that I'm uncertain about.
View 1 Replies
Oct 5, 2010
I'm trying to redirect users upon login based on their roles which were defined in the Administer website feature of asp.net.Heres what I'm trying protected void Login1_LoggedIn(object sender, EventArgs e)
View 2 Replies
Mar 4, 2010
I have the membership provider and the create user with tow steps, one of the steps contains a custom registration form, for each created user data will be in the database, and there is an account page shows the data that the new created user did insert during the registration process on the custom registration page,
the problem, when the user is created and logged into his account page, this account page shows only the information for the first created user, not the info on the logged in user , but the logged in user data still saved in database and not showing on his account page?
This is web.confg code:
<?xml version="1.0"?>
View 22 Replies
Mar 17, 2011
I have just created an extra table named AccountDetails with four columns named AccNo,Balance,Transfer and UserId as foreign key to aspnet_userID primary key. I want to display users account and balance whenever the user successfully loged in.
View 4 Replies
Mar 25, 2011
I'm using ASP.NET MVC and I want to authenticate users with their Google or Facebook account
View 4 Replies
Nov 15, 2010
i have a button. if the user click this button a url gets executed. but the user should remain on the same page. How do i do this?
View 4 Replies
Sep 13, 2010
I have 3 roles set up and want to redirect user after login depending on userrole.
my code is:
[Code]....
It seems to hit the first if statement and redirects the admin to the right folder but the members do not get redirected. I am not sure what I am missing.. this seems to be a pretty simple thing to do but will not work right for some reason.
View 2 Replies
Aug 15, 2012
I created a user manually using Membership.CreateUser(). User created successfully but as soon user create Logged In User's tasks display. I want to use DisableCreatedUser() some how. or is any method to disable it?
View 1 Replies
Feb 2, 2014
I have a registration page I enter the details of the customers and redirect to another page for capturing photo and I come back to the registration page. I want to retain all the values i entered when i land on the registration page.
View 1 Replies
Jul 17, 2010
I am implementing strightforward membership provider. I do not want new users to be able to login without being approved.
I have tried the setting on the registration wizard called DisableCreatedUser="True" and this does not work.
I also set LoginCreatedUser to False, and the user still gets logged in.
If I look in the SQL membership table, 'IsApproved' is set to 0 for the account, but they can still login.
View 9 Replies
Jun 17, 2010
In my application , i'm having a user agreement page which will get displayed when a user login for the first time, in the user agreement page if any user directly type the next page url, application will navigate to the successive pages without accepting the agreement. i want the user to navigated to the same page or login page when he directly type the URL in the agreement page.
View 3 Replies
Jun 11, 2010
For some absurd reason, the create user wizard is not redirecting me to the home page, when I create a user account. My current code is:
[Code]....
It's strange because the ContinueDestinationPageUrl ="~/Default.aspx" is set.
View 3 Replies
Mar 24, 2010
I need to send emails based on users input time and day (based on their time zone)? Kind of a reminder.
For Example: User input 2:00pm Eastern Time on my server I have different time zone, how to calculate the time and send the email at users time-zone. Its a web application. What is the best way to accomplish it using asp.net c#? If somebody already done it in the past I will be glad to take a look at source code.
View 1 Replies
Mar 25, 2010
I facing a problem here. how can I make the create user wizard category all the new user become normal user role? I have created 2 role which is Manager and Normal User. Normal User can't view the Manager page. But after i create a new user account, i can view manager and normal user page. I want to make all the new member registration will be normal user role?
View 6 Replies
Nov 2, 2010
I am trying to display the user browsing the web forms NT account in a Label. I'm trying two ways to do this. The first way.
[Code]....
When I use this code and publish the app to the web I get the error message:
Index and count must refer to a location within the string.Parameter name: count Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Index and count must refer to a location within the string.Parameter name: countSource Error:
[Code]....
Stack Trace:
[Code]....
If I use this code
[Code]....
The page displays but the username doesn't display in the label?
View 3 Replies
Feb 7, 2011
I have created a forgot password page with a PasswordRecovery control in it.
<asp:PasswordRecovery ID="PasswordRecovery1" runat="server"
BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px"
Font-Names="Verdana" Font-Size="0.8em" Height="210px"
onsendingmail="PasswordRecovery1_SendingMail" Width="491px">
I want to redirect the user back to the login.aspx page once the user clicks the Forgot Password button.
View 2 Replies