473,383 Members | 1,737 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,383 software developers and data experts.

Rolemanager

JP
Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that this is
not the case and every time I do Roles.IsUserInRole in the UI, the
database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?


Dec 4 '06 #1
7 2585
Since role information for each user is stored in a cookie on the client,
this propably means that the clients browser does not support cookies.

Gabriel Lozano-Morán

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that this
is not the case and every time I do Roles.IsUserInRole in the UI, the
database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?


Dec 4 '06 #2
For more info see the last paragraph "Caching Role Information":
http://msdn2.microsoft.com/en-us/library/5k850zwb.aspx

Gabriel Lozano-Morán

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that this
is not the case and every time I do Roles.IsUserInRole in the UI, the
database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?


Dec 4 '06 #3
JP
Hi Gabriel
The browser does accept cookies. I have confirmed this. It has Firt Party
cookies to Accept and Third Party cookies to accept

Thanks

"Gabriel Lozano-Morán" <ab***@frontbridge.comwrote in message
news:OQ****************@TK2MSFTNGP05.phx.gbl...
For more info see the last paragraph "Caching Role Information":
http://msdn2.microsoft.com/en-us/library/5k850zwb.aspx

Gabriel Lozano-Morán

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
>Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that this
is not the case and every time I do Roles.IsUserInRole in the UI, the
database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?



Dec 4 '06 #4
and does each subsequent call to IsInRole() in a single http request cause a
database roundtrip?

Gabriel

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
Hi Gabriel
The browser does accept cookies. I have confirmed this. It has Firt Party
cookies to Accept and Third Party cookies to accept

Thanks

"Gabriel Lozano-Morán" <ab***@frontbridge.comwrote in message
news:OQ****************@TK2MSFTNGP05.phx.gbl...
>For more info see the last paragraph "Caching Role Information":
http://msdn2.microsoft.com/en-us/library/5k850zwb.aspx

Gabriel Lozano-Morán

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
>>Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that
this is not the case and every time I do Roles.IsUserInRole in the UI,
the database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?




Dec 4 '06 #5
Also what role provider are you using and have you tried persistant cookies?

Gabriel

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
Hi Gabriel
The browser does accept cookies. I have confirmed this. It has Firt Party
cookies to Accept and Third Party cookies to accept

Thanks

"Gabriel Lozano-Morán" <ab***@frontbridge.comwrote in message
news:OQ****************@TK2MSFTNGP05.phx.gbl...
>For more info see the last paragraph "Caching Role Information":
http://msdn2.microsoft.com/en-us/library/5k850zwb.aspx

Gabriel Lozano-Morán

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
>>Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that
this is not the case and every time I do Roles.IsUserInRole in the UI,
the database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?




Dec 4 '06 #6
JP
Hi Gabriel,
I did change the cookies to persistent and the role provider I use is the
SQL Role Provider. I have a bunch of AJAX so with constant refreshes, this
behavior impacts performance .

Thanks

"Gabriel Lozano-Morán" <ab***@frontbridge.comwrote in message
news:ua**************@TK2MSFTNGP05.phx.gbl...
Also what role provider are you using and have you tried persistant
cookies?

Gabriel

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
>Hi Gabriel
The browser does accept cookies. I have confirmed this. It has Firt
Party cookies to Accept and Third Party cookies to accept

Thanks

"Gabriel Lozano-Morán" <ab***@frontbridge.comwrote in message
news:OQ****************@TK2MSFTNGP05.phx.gbl...
>>For more info see the last paragraph "Caching Role Information":
http://msdn2.microsoft.com/en-us/library/5k850zwb.aspx

Gabriel Lozano-Morán

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov.. .
Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that
this is not the case and every time I do Roles.IsUserInRole in the UI,
the database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?






Dec 5 '06 #7
JP
Well , per the documentation
"If a user's browser allows cookies, ASP.NET can optionally store role
information in an encrypted cookie on the user's computer. On each page
request, ASP.NET reads the cookie and populates the role information for
that user from the cookie."

Shouldn't this cached information be used across requests?

"Gabriel Lozano-Morán" <ab***@frontbridge.comwrote in message
news:Oj******************@TK2MSFTNGP02.phx.gbl...
and does each subsequent call to IsInRole() in a single http request cause
a database roundtrip?

Gabriel

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov...
>Hi Gabriel
The browser does accept cookies. I have confirmed this. It has Firt
Party cookies to Accept and Third Party cookies to accept

Thanks

"Gabriel Lozano-Morán" <ab***@frontbridge.comwrote in message
news:OQ****************@TK2MSFTNGP05.phx.gbl...
>>For more info see the last paragraph "Caching Role Information":
http://msdn2.microsoft.com/en-us/library/5k850zwb.aspx

Gabriel Lozano-Morán

"JP" <JP*********@yahoo.comwrote in message
news:ne********************@dada.knx.tva.gov.. .
Hi folks
I have the following settings for my Rolemanager
roleManager enabled="true" cacheRolesInCookie="true" cookieTimeout="30"
cookieSlidingExpiration="true" cookieName=".ASPXROLES"

My Expectation was that any hit to the database after the initial load
should be after 30 minutes for a session , however I have found that
this is not the case and every time I do Roles.IsUserInRole in the UI,
the database Stored Proc is being called.( I was running a trace)

Can anybody throw some light on this?






Dec 5 '06 #8

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

Similar topics

0
by: 1.1 SDK installed after the removal | last post by:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <authentication mode="Forms" /> <roleManager enabled="false" /> <!-- <roleManager enabled="true" /> --> <!-- BSam 06/06/2005...
1
by: Lloyd Dupont | last post by:
I'm trying to understand ASP.NET 2.0 integrated security/login/profile/etc..... Running the Admin tool I get this added in my config file: <membership defaultProvider="AspNetSqlProvider" />...
4
by: techsupport | last post by:
I have some experience with .NET Remoting, as well as ASP.NET 2.0, and have been wanting to remote a custom membership and profile provider. I want to take advantage of the new controls in ASP.NET...
0
by: Weaver | last post by:
Hi all, Is there a way to invalidate the cache of the AuthorizationStoreRoleProvider rolemanager provider from ASP.NET 2.0? We have a project where we adjust role settings via Authorization...
0
by: nicolasl | last post by:
Hello, I have built a custom roleManager Provider that I have turned into a dll so I can share it accross multiple applications. When I try to add it to a web.config file I get the following...
1
by: Joel Reinford | last post by:
I am trying to build custom membership/role providers, inheriting from the base membership/role providers because I have an existing database with user authentication and roles. The membership part...
2
by: Annie | last post by:
Hello guys, I have set the MEMBERSHIP, ROLEMANAGER and PROFILE in my config file as below. I just want to use my own sql server 2000 table instead of MSDB.
0
by: J | last post by:
<roleManager enabled="true" defaultProvider="CustomProvider" cacheRolesInCookie="true" cookieName=".MOSSROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false"...
2
by: Nathan Sokalski | last post by:
When I call System.Web.Security.Roles.GetRolesForUser() it returns no results even though I have roles associated with the currently logged in user. I am able to get the username by calling...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.