473,670 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session vs. RoleProvider

Please help... i am stumped...

I have an app, written in VB.NET fwiw. I have a custom RoleProvider class,
cuz i finally got tired enough of hacking with application variables, to
learn the "correct" way to do roles. ;) ....

Now, the problem, is that my RoleProvider, and my FormsAuthentica tion
Session do not stay together. That is to say, i frequently see cases where
the session will expire, but the RoleProvider does not. Now, they both have
their expiration timeouts set to the same values in the web.config file.

So what i wind up with is being able to access the "locked down" areas of my
site (because my RoleProvider is still providing the correct roles) even
though my forms authentication has expired. How can i force
FormsAuthentica tion and a custom RoleProvider to stay in lock-step???
This is a major problem, and comprises a pretty significant security hole.
Even though FA has expired, and it SHOULD send me back to my login page, it
doesn't because the RoleProvider is still saying i have "Admin" rights (or
whatever rights, for the 'secured' section).

I hope someone can help me with this; Thanks in advance,
- Arthur Dent.

May 15 '07 #1
1 1716
On May 15, 6:07 pm, "Arthur Dent" <hitchhikersgui deto-n...@yahoo.com>
wrote:
Please help... i am stumped...

I have an app, written in VB.NET fwiw. I have a custom RoleProvider class,
cuz i finally got tired enough of hacking with application variables, to
learn the "correct" way to do roles. ;) ....

Now, the problem, is that my RoleProvider, and my FormsAuthentica tion
Session do not stay together. That is to say, i frequently see cases where
the session will expire, but the RoleProvider does not. Now, they both have
their expiration timeouts set to the same values in the web.config file.

So what i wind up with is being able to access the "locked down" areas of my
site (because my RoleProvider is still providing the correct roles) even
though my forms authentication has expired. How can i force
FormsAuthentica tion and a custom RoleProvider to stay in lock-step???
This is a major problem, and comprises a pretty significant security hole.
Even though FA has expired, and it SHOULD send me back to my login page, it
doesn't because the RoleProvider is still saying i have "Admin" rights (or
whatever rights, for the 'secured' section).

I hope someone can help me with this; Thanks in advance,
- Arthur Dent.
Hi Arthur,

1. can you post here the code of your custom role provider?
2. what timeout value you have set in the authentication tag of the
web.config file?

BR,

May 23 '07 #2

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

Similar topics

1
2331
by: Mark Olbert | last post by:
I've written a custom MembershipProvider and a custom RoleProvider, and am trying to get them to work with the ASP.NET Configuration tool. Which is a royal pain in the butt, because there doesn't appear to be any way to debug the Configuration tool. In any event, when I create a new user I get the following error message: An error was encountered. Please return to the previous page and try again. The following message may help in...
0
1420
by: Mark Olbert | last post by:
I'm posting this here to save other folks some hair-pulling time. No need to respond. You can debug custom MembershipProvider and RoleProvider classes under the ASPNET Configuration tool by attaching the debugger to the server process which generates the configuration web pages. Once you've done that you can set breakpoints in your custom classes and stop on them. You can also single-step into the configuration pages themselves. - Mark
0
3232
by: joseph conrad | last post by:
Hi, I tried to implement my own session handler in order to keep control on the process the drawback I foun it is not creating and storing in my cookie the PHPSESSID variable anymore. reading te documentation it seems it should do it anyway any advice?
14
2369
by: aroraamit81 | last post by:
Hi, I am facing a trouble. I have some Session variables in my code and somehow my session variables are getting mixed up with other users. For example User A has access to 10 companies and User B has access to 5, now when both of us hits to the server at the same time then their session variables gets mixedup means either User A and USer B will have now 5 companies or both have 10 companies. Now again when User A hits to the server...
7
3964
by: aroraamit81 | last post by:
Well Guys, Here is a very strange trouble. When more than one users request tto same page at the same time then our session gets conflicted. Moreover I printed my SessionID, strangely but true I got the exact same SessionID as of other users's. Well I guess nothing wrong with my code, do I need to set any property in Web.Config file??
1
2589
by: Santosh | last post by:
Dear All i am writting a code sending mail with attachement. i am writting code for sending mail in one page and code for attaching a file in the next page. aftet attaching a file i am taking name of that file from attaching file page to email page through in session file .i am giving a facility of attaching five files to user . and i am taking names of both files in session variables but user attach less than five five
0
999
by: caius | last post by:
Hi, I recently develop a custom membership provider and role provider . I did configure the central admin and the SharePoint site to use them. I can now use the login page and authenticate to SharePoint when the user is listed as a member of the site, when it is not listed as a member but is in a role it never works. When I attach visual studio and try to authenticate, I see the user getting through the validateUser on my membership...
5
2429
by: lyealain | last post by:
<% If Session("username") = "" Then Response.Redirect("/CLS/Login.asp") End If Dim conn Dim connectstr Dim db_name, db_username, db_userpassword Dim db_server Dim res
2
2316
by: =?Utf-8?B?d2lsbGlhbQ==?= | last post by:
Hi, Could anyone tell me how to change the default roleprovider at runtime? Basically I have a few sets of roleprovider and membership provider, I want to switch among them at runtime based on some sort of identifier. Thanks. William
0
8384
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8901
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8813
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7412
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6212
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4208
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4388
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1791
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.