Web Forms :: Login Based On Roles

May 7, 2015

I create a login where both the super admin users can also login into it and the general users can also login into it..

If the super admin user logins he must land on the separate page and the general users must login to a separate page...

How it is possible...

View 1 Replies


Similar Messages:

Web Forms :: How To Implement Login With Roles

Jan 16, 2014

i have my login fully working 100%  but i when someone who is not an admin try to enter a web that is only for admins it crash

how can i make it to send a msgbox "admin only"(or something like that)  instead of the crash of the web app ?

View 1 Replies

Web Forms :: Hide Sub Menu Items Based On Roles?

Jul 23, 2013

I have menu item on which come from website map. I have trimmed the main item of menu based on user roles.

Like i have one menu in which i have 5 reports i want to show 2 reports to agents and 5 reports to admin. how to apply roles on sub menu item.

View 1 Replies

Web Forms :: Hide Menu Control Items Conditionally Based On Roles

Aug 12, 2013

I have written code for menu with web.sitemap and SiteMapDataSource1.I want to hide the admin panel if user has no admin rights.

How there is relation between sitemapdatasource,web.sitemap and menu.

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />
<asp:Menu ID="Menu" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal"
OnMenuItemDataBound="OnMenuItemDataBound" onmenuitemclick="Menu_MenuItemClick" Width="100%">
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="main_menu" />

[Code] .....

View 1 Replies

User Controls :: Implement Custom User Login With Roles Without Using Login Control

May 7, 2015

What if, I'm not using the LOGIN CONTROL but rather creating a Custom Control for Login. Is it possible to have user roles and a site map that redirects to its own destination when the user login?

View 1 Replies

Security :: Display Sitemap Based On Rolled Based Login

Mar 26, 2010

which i added one sitemap in whcih i added all the pages n i want to retrive that sitemap in masterpage based on login in whcih suppose admin hs login then display only admin pages with sitemap n if normal user hs login then it ll display only normal user pages with sitemap. here i didn't use login control but i create login page manually.

View 1 Replies

Security :: Redirecting Based On Roles C#?

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

Security :: Login Form Rejecting Valid Login With Forms Based Security And Membership Service

Jan 21, 2010

I've set up a system with forms based authentication and using the asp:Login control. When I put in an invalid password I get the approriate invalid password message. However when I put in a valid password, it does nothing...just returns to the login page again. I'm triple checked the login info. There is no error message, and the invalid attempts counter doesn't increment. When I put a break point in the Login_LoggedIn event of the Login form, it hits it, but User.Identity.IsAuthenticated is false. I'm not 100% sure it should be true at this point, as I'm pretty new to .NET but it seems kind of odd.

My user database is stored in a sqlserver 2005 db that already existed. I've added a new connection for it.In the authorization I have

<authorization>deny
users="?"/><authorization>

View 2 Replies

Security :: Allow Clients To Login To Website And Connect To Specific Server Based On Login

Jul 5, 2010

We have created a windows application which is distributed amongst our clients. The application uses SQL Server 2008 as the back end and each client uses their own database on their own server. The databases are all exactly the same but each clients data is specific only to them.

We would like to offer our clients the ability to log-in to our website which would then login to their own database so that when they are out in the field they can perform similar tasks to what they can do with the windows app.Each of the clients databases has a user table containing their login details, permissions etc.

Our server is running on IIS and has SQL Server 2008 installed but it only contains our data and nothing of the clients.How should we go about this?

What I mean is do we need to make each client have an additional login to our main server which would then hold each clients individual connection strings etc which would then be used to connect to there specific database and then they would need to login again?? Seems like a nightmare for the user.

View 13 Replies

Security :: Secured Site Using The Login Control / Do Not Want Them Redirected Based On Their Login Status?

Mar 24, 2011

I am doing a simple secured site using the login control. I would like users to be redirected to their dashboard page once they log in, but after that if they choose to browse I do NOT want them redirected based on their login status. I am using the generic template provided in VWD with the basic login setup in the template including the tabbed ASP menu control - nothing fancy, nothing custom. This is intended to be something very simple and quick. Here is the code I am using for the page load...

[Code]....

So if I do this code WITHOUT the "IsPostBack", logged in users are always redirected to their dashboard and cannot see the hompage. However with that IsPostBack test, the redirect after initial login doesn't work.

I know this is extremely basic and simple, but I am restarting with this stuff after a year away, and I need a nudge.

View 4 Replies

Security :: How To Get Roles After Login

Jan 7, 2010

I have used .net login control to authenticate user,i have three types of role ,role1,role2 and role3 and i have users and user have different roles.

now my requirement is like as per loggedin user i want to redirect user on particular page as per role.

for example if loggedin user role is role1 than he will redirect default1.aspx
for example if loggedin user role is role2 than he will redirect default2.aspx
for example if loggedin user role is role3 than he will redirect default3.aspx

and one question if same user may be have more than one role than what should happen???

I got a solution for same than if we are used "loggingin" event than it would be possible but i had placed login control in login view anonymous template because as per my requirement i want that after successfull login user can't see login control on page.thats why i didn't get the login control event on code.

View 6 Replies

C# - Login To Two Different Pages According To Roles?

Jan 18, 2010

My project has a Guest folder and an admin folder.

Guest has a guest1.aspx page and admin has admin1.aspx page.

Now I am trying to figure out a login control which will check the role of the user and send them to the respective pages accordingly.

The names are not in the database or the active directory...

These names are on the windows 2003 server...

So I need to check from the server if the user exists and what is its role in it.. Suppose there is company which has 10 employees and one administrator.. the company has a server and these employees are on the same domain. So the admin can add that machine to the server or delete it.. now every machine has its username password and domain.. i want my gui to use the same credentials to log into the gui and send them to the respective pages according to the role..

View 2 Replies

AJAX :: Restrict Tabs Based On Roles?

Mar 1, 2010

I am currently working on a website with a Tab Container with roughly 5-10 tabs. I would like to have an Admin tab that is disabled to all users except those who are assigned in an Admin role (I have 2 roles, Admins and Customers). I am fairly new to ASP.NET so please bare with me. I have been crashing through it for about 3 weeks now, trying to help a friend get a site up and running!

View 6 Replies

Security :: Equivalent For LoginView Based On Roles?

Apr 21, 2010

I have a website where users can login and they have different roles/privileges. I want to have it where the user's view of the webpage is determined by their role. Right now I am storing the role in the UserData property of the FormsAuthenticationTicket class (which is retrieved from a database during login). When the main page is loading, I want it to check the user's role and then only show the controls/portions of the page that are for that role. For example, if the user is not an administrator, they shouldn't be able to click on a button to delete a record. At the moment I am using labels to hide or show areas depending on the user's role. Something like this:

[Code]....

[Code]....

And here is a portion of the markup code with the Labels:

[Code]....

This works, but doesn't seem to be a very good way to handle this type of thing. Is there a cleaner, more elegant way of doing this? Something similar to the LoginView control, but which I can use for roles?

View 4 Replies

Security :: Redirect To Different Folders Based On Roles?

Jul 4, 2010

I have implemented membership and enable role based on. I have 2 roles "admin" and "super_admin" and once the user login, I want to redirect them to different folder based on their role. My guess is, the redirection need to be determined once the user clicked login on the login control and here is my code.

[Code]....

However, whenever the user login (regardless of admin or super_admin) the page keeps redirection to Anyone/Default.aspx.

View 5 Replies

Hierarchical SQL Roles Based On Default RoleProvider

Feb 11, 2011

I'm trying to implement the following adjustments to the default ASP.NET RoleProvider so that it supports hierarchical role definitions. However i cannot create the following function, it keeps Executing the function.

Ref: [URL]

What is wrong with this function?

-- Template generated from Template Explorer using:
-- Create Multi-Statement Function (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the function.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
CREATE FUNCTION [dbo].[aspnet_Roles_Ancestor_TVF] (
@RoleId uniqueidentifier
)
RETURNS
@aspnet_Roles TABLE (
ApplicationId uniqueidentifier
, RoleId uniqueidentifier
, RoleName nvarchar(256)
, LoweredRoleName nvarchar(256)
, Description nvarchar(256)
, ParentRoleId uniqueidentifier
)
AS
BEGIN
; WITH aspnet_Roles_CTE (
ApplicationId
, RoleId
, RoleName
, LoweredRoleName
, Description
, ParentRoleId
, HierarchyLevel
) AS (

[Code.....]

View 2 Replies

Hide ActionLinks Based On User Roles?

Jul 8, 2010

In a standard, generated list view, how can I hide certain ActionLinks based on the roles the logged in user belongs to?

View 1 Replies

User Permissions On Certain Views Based On Roles?

Feb 23, 2011

I am using ASP.NET MVC 3. We assign roles to certain people at work, then we use Windows authentication to determine what roles a user has. Lets say the roles are RoleA, RoleB and RoleC. So now I get a list of roles for a user. Lets says that UserA belongs to RoleA and RoleB. Some of my views need to be authenticated as not everyone can view certain views. Lets say that ViewA can only be viewed by users that belong to roles RoleA and RoleB. How would I do this? What would I need to look into? When a user that does not belong to these roles tries to access the views then he/she should be redirected to an error page.

View 1 Replies

VS 2010 - Hide DIVs Based On Roles

Mar 26, 2012

I have a bunch of divs that are widgets. I am using a custom role provider and I need to hide the divs based on roles. Is it better to add a "runat=server" attribute to the div so that I can hide/unhide in the code behind? Should I hide/unhide on the aspx page or do i use panel controls and hide/unhide in the code behind?

View 1 Replies

Assigning Roles On Login / Registration?

May 13, 2010

I have read many posts and have tried many solutions to this problem.

Simply enough, I can assign a role to a user programically during development, but when I publish to the 'web', the system doesn’t work. I am useing VWD 2008 in VB.Net.

I have been using permutations of : Roles.AddUserToRole("User.Name", "User").

Roles work throughout the site (per page/directory). Is there something I am missing?

View 2 Replies

Security :: Login To Different Pages With Different Roles?

May 18, 2010

I have created 3 different folders (admin, user, viewer) in my site and each has a different template (masterPage). I created user and roles which are admins, users, and viewers. I assigned each role to a user in .Net administration Tool.

What I need to do is to allow each user to access his page only and deny access to others , except for the admin who can access all pages.

View 4 Replies

Security :: Send User To Different Pages Based On Their Roles

Nov 19, 2010

I'm using the built-in membership controls and classes to manage authorization and authentication in my app. Here's what I want to do: If the user is in "Manager" role, I want to send him/her to the manager page no matter where he/she came from. If the user is in "Supervisor" role, I want to send him/her to supervisor page no matter where he/she came from. However, if the user is not in any role, just a registered member, I want to send him/her back to where he/she came from as stated in ReturnUrl. If no, ReturnUrl is specified, I will send him/her to the home page.

On my login page, I'm using the Login server control but in my code behind, there's no method wired to the control because the control takes care of everything. I assume I need to add a method and wire it to the submit button, is that right? If so, I'll have to really handle the login event which means I'll need more info about how to do that.

View 6 Replies

Security :: Trying To Get Roles To Populate A Checkboxlist Based On Tutorial?

Aug 17, 2010

I have been using the following tutorial and had to convert the code to C# for my project, now i cant get the code to work, im getting red line under the word "in" in the UpdateRolesFromList,
i tried to add a datasource on page load for the checkboxlist like so RoleList.DataSource = PopulateRoleList(User.Identity.Name.ToString());and gives me error saying cannot implictly convert type 'void' to 'object'
[URL]What am i missing, that when i load the page or even do a search it never displays the checkbox list as it shows in the tutorial?

[Code]....

View 7 Replies

SiteMap Based On User Roles Doesn't Works?

Sep 22, 2010

I have sitemap which looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/default.aspx" title="Prva stran" roles="*" description="Shema ISEF">
<siteMapNode roles="2" title="Analize" id="Analize" description="" >
<siteMapNode url="~/karneki1.aspx" title="Karneki1" description="" />
<siteMapNode url="~/karneki2.aspx" title="Karneki2" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>

if I set roles in a siteMapNode with title "Analiza" it works fine, the link is not shown in the navigation... but if I set roles on any of "karneki" siteMapNode the links are still visible...

Is it even posible to restrict access to lower links based on user role?

View 1 Replies

Security :: Redirect To Specific Web Page Based On Roles?

Oct 26, 2010

Is there a tutorial on how to redirect user to a specific web page based on his/her role? For example, I have teacher role and student role. When the teachers login, it will redirect the teacher to the teacher web page and the students redirected to the student web page.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved