473,480 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Redirect start page based on user role?

dgk
I'm trying to redirect the user using the built-in authentication
(ASP.Net 2) and it looks like the correct place would be the LoggedIn
event of the Login control. But apparently the user and roles aren't
available yet. At least in VB, the My.User.IsInRole fails there.

If I check at the page load of the start page it works ok, but I
figured that it would be cleaner just setting the DestinationPageUrl
property of the login form.

Is there a better way to handle this?
Jul 17 '06 #1
2 1869

I think you might try a

FindTheFork.aspx
page.

Set the desitinationPageURL there, and then put your logic in the
FindTheFork.cs file to.... figure out where to do.

"dgk" <dg*@somewhere.comwrote in message
news:dn********************************@4ax.com...
I'm trying to redirect the user using the built-in authentication
(ASP.Net 2) and it looks like the correct place would be the LoggedIn
event of the Login control. But apparently the user and roles aren't
available yet. At least in VB, the My.User.IsInRole fails there.

If I check at the page load of the start page it works ok, but I
figured that it would be cleaner just setting the DestinationPageUrl
property of the login form.

Is there a better way to handle this?

Jul 17 '06 #2
dgk
On Mon, 17 Jul 2006 15:28:50 -0400, "sloan" <sl***@ipass.netwrote:
>
I think you might try a

FindTheFork.aspx
page.

Set the desitinationPageURL there, and then put your logic in the
FindTheFork.cs file to.... figure out where to do.

That's sort of what I did. I just set a session variable to indicate
that it's the first pass and in the default page load I check the user
to see where they should be sent. I figured that there might be a more
elegant way, but it works fine.
Jul 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
12135
by: lukeo | last post by:
I'm shelling out to an .asp (or htm) page from an application. I want to show this in a window without the address bar, etc... Is there a way I can redirect this page using javascript to a page...
3
2321
by: craig | last post by:
I am working on my first .NET development project that involves custom role-based security per the project requirements. This lead to a general design issue this week that really caused us some...
0
979
by: hoover_richard | last post by:
I am trying to develop a website and the website runs fine on my development server, but when I upload the site to the server I have problems with the redirection based on the user role once a user...
2
3028
by: Jesper Stocholm | last post by:
I have implemented role-based security within my ASP.Net application. However, it seems the role is not passed to the authentication ticket I create. I want to use it to display/hide some...
3
9830
by: Tom | last post by:
Hi, I have an index.aspx page which includes top.aspx, left.aspx, main.aspx and bottom.aspx. In the left.aspx, there is a login web control - login.ascx. It keeps session of username and role...
2
344
by: Q. John Chen | last post by:
All, I am using Form Authentication with Roles. E.G. PageA.aspx is permitted for Role "Admin", and PageB.aspx is permitted for Role "Basic". When a user of "Basic" role try to access an...
4
1609
by: Brian Lowe | last post by:
I'm using Forms authentication with my user data in a SQL db. I have pages in the main appliaction folder accessible to anonymous users and I've set security to deny annonymous users access to...
1
2529
by: rouellette | last post by:
Is it possible to redirect to another page in your application from the start page BEFORE the user has been authenticated if you're using FORMS authentication? I can't seem to get it to work. ...
1
1659
by: =?Utf-8?B?U2VtU2Vt?= | last post by:
Helloz iam working in a web application for univesity. ihave diffrent kind of roles like: 1-Studetn Affairs 2-Staff imake three sperate master pages for them.: example:
0
7033
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6903
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6726
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5318
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4468
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2987
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
557
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
170
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.