473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Sessions in Custom RoleProviders

I'm working on a Web Application where we control access to our Web Pages by
using Roles. We assign which roles can view which web pages in our
Web.sitemap file. Due the nature of our Application we needed to create our
own Cusomt Role Provider that will go out to the database and get the roles
for the logged on user. As it turns out a User's list of roles can change
while they're browsing through the application. We store information
surrounding the user's new role in a Session variable, but the vast majority
of the time when our Custom RoleProvider is called by the Framework the
Session variables are not avialable. Is there a way to pull this data from
the Session variables, perhaps some way of telling the framework to call our
RoleProvider only after Session variables have been loaded. We have thought
about storing this data in a cookie, but this data is accessed via a Session
all throughout the program, namely SqlDataSources. Changing the data from a
Session to a Cookie would be prohibitive. I appreciate the help. Thank You.
Oh, we're using ASP.NET 2.0 running on IIS 6 in Windows 2003.
Apr 18 '07 #1
1 2025

I'm trying to read thru this:

1. Roles change while a user is logged in.
2. You're using a Custom Role Provider.
3. You store a cached copy of the roles in the Session variable.
Are you storing the values in the Session to help with db hits?
Aka, I can see why you don't want to hit the db every time for a user's
roles.


"anonymous" <an*******@discussions.microsoft.comwrote in message
news:22**********************************@microsof t.com...
I'm working on a Web Application where we control access to our Web Pages
by
using Roles. We assign which roles can view which web pages in our
Web.sitemap file. Due the nature of our Application we needed to create
our
own Cusomt Role Provider that will go out to the database and get the
roles
for the logged on user. As it turns out a User's list of roles can change
while they're browsing through the application. We store information
surrounding the user's new role in a Session variable, but the vast
majority
of the time when our Custom RoleProvider is called by the Framework the
Session variables are not avialable. Is there a way to pull this data
from
the Session variables, perhaps some way of telling the framework to call
our
RoleProvider only after Session variables have been loaded. We have
thought
about storing this data in a cookie, but this data is accessed via a
Session
all throughout the program, namely SqlDataSources. Changing the data from
a
Session to a Cookie would be prohibitive. I appreciate the help. Thank
You.
Oh, we're using ASP.NET 2.0 running on IIS 6 in Windows 2003.

May 8 '07 #2

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

Similar topics

2
by: The Plankmeister | last post by:
Hi... I'm trying my hardest to understand fully how sessions work and how best to use them. However, all I can find is information that doesn't tell me anything other than that sessions store...
13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
5
by: bryan | last post by:
Hi folks, I've got a question about sessions in PHP. I'm a *gulp* ASP coder, so please bear with me. I developed a PHP site a few months back that has a password protected entry into a...
0
by: Jerad Rose | last post by:
I have an odd scenario. I am working on a hybrid site that uses various development platforms, namely traditional ASP and Lasso (a Mac scripting language). The site uses its own custom sessions...
2
by: Cesar Ronchese | last post by:
Hello, I'm experiencing a very weird problem. I have a ASP.Net 2005 application (VB.Net) that creates some folders to store temporary files. example: Session_Start(...)...
9
by: Laurent Bugnion | last post by:
Hi, I am wondering what is the best way to find out which ASP.NET sessions are still active. Here is the reason: I have a custom control which can upload files. It saves the files in a folder...
2
by: runner7 | last post by:
Can anyone tell me if there is a way in PHP to determine when a session times out on the server or how many concurrent sessions there are in your application?
3
by: Schraalhans Keukenmeester | last post by:
I never saw it before, but today I got several: Fatal error: session_start() : Failed to initialize storage module: user (path: /tmp) in...
9
by: Gilles Ganault | last post by:
Hello Some data are common to all user sessions, and to improve performance/save resources, I'd like to share those data between all sessions, so that each user doesn't have to hit MySQL for the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.