Ask a Question related to ASP.NET Security, Design and Development.
-
David Nicholson - SP/A Shaw Cablesystems #1
IsInRole Performance Issue
Hi,
We have a very large AD here and I am noticing that the WindowsPrinciple
IsInRole function is taking upwards of 1 second to respond with just a single
user. I am assuming that this function re-queries the AD everytime. When it
reaches about 50 users each query is taking > 10 seconds. Is there anyway to
cache the AD query and still use the IsInRole?
Thanks :)
David Nicholson - SP/A Shaw Cablesystems Guest
-
Performance issue
I have an array with around 40 different url values in it. Im trying to cfhttp each URL in turn, and then parse the contents of each URL one by one.... -
CFMail - performance issue
Hi, I have developed a discussion board on which users can subscribe to particular topics. Subscribed users receive an email (with link back to... -
7.x to 9.x Performance issue in the extreme
Greetings, The problem: I run an identical program on Server A and Server B. On Server A the program runs in 12 seconds. On Server B it takes 1.5... -
Performance Issue using SQLJ
Hi. We're looking at using SQLJ to see how we could incorporate it into our environment and achieve better throughput and cost savings over using... -
Solaris/UFS logging performance issue.
Some systems here have been upgraded from Solaris 2.6 to Solaris 8. Broadly, these systems run Veritas Volume Manager (VxVM) on A5200s - one root... -
moverton #2
Re: IsInRole Performance Issue
David, did you ever resolve this problem? We are seeing very simila
problems.
-mark
David Nicholson - SP/A Shaw Cablesystems wrote:> *Hi,
> We have a very large AD here and I am noticing that th
> WindowsPrinciple
> IsInRole function is taking upwards of 1 second to respond with jus
> a single
> user. I am assuming that this function re-queries the AD everytime
> When it
> reaches about 50 users each query is taking > 10 seconds. Is ther
> anyway to
> cache the AD query and still use the IsInRole?
> Thanks :)
-
moverto
-----------------------------------------------------------------------
Posted via [url]http://www.codecomments.co[/url]
-----------------------------------------------------------------------
moverton Guest
-
Gabriel Lozano-Morán #3
Re: IsInRole Performance Issue
Do you get performance problems when the number of roles a user is in is
higher than the magic number 23 ?
Gabriel Lozano-Morán
"moverton" <moverton.1o60hp@mail.codecomments.com> wrote in message
news:moverton.1o60hp@mail.codecomments.com...>
> David, did you ever resolve this problem? We are seeing very similar
> problems.
> -mark
>
> David Nicholson - SP/A Shaw Cablesystems wrote:>>> *Hi,
>> We have a very large AD here and I am noticing that the
>> WindowsPrinciple
>> IsInRole function is taking upwards of 1 second to respond with just
>> a single
>> user. I am assuming that this function re-queries the AD everytime.
>> When it
>> reaches about 50 users each query is taking > 10 seconds. Is there
>> anyway to
>> cache the AD query and still use the IsInRole?
>> Thanks :) *
>
>
> --
> moverton
> ------------------------------------------------------------------------
> Posted via [url]http://www.codecomments.com[/url]
> ------------------------------------------------------------------------
>
Gabriel Lozano-Morán Guest
-
Joe Gilkey #4
Re: IsInRole Performance Issue
Gabriel Lozano-Moran wrote:
Try using the CacheRolesInCookie property on the Roles class (ASP.NET> Do you get performance problems when the number of roles a user is in
> is higher than the magic number 23 ?
>
> Gabriel Lozano-Moran
>
> "moverton" <moverton.1o60hp@mail.codecomments.com> wrote in message
> news:moverton.1o60hp@mail.codecomments.com...> just >> a single> >
> > David, did you ever resolve this problem? We are seeing very
> > similar problems.
> > -mark
> >
> > David Nicholson - SP/A Shaw Cablesystems wrote:> >> *Hi,
> >> We have a very large AD here and I am noticing that the
> >> WindowsPrinciple
> >> IsInRole function is taking upwards of 1 second to respond with> >> >> user. I am assuming that this function re-queries the AD everytime.
> >> When it
> >> reaches about 50 users each query is taking > 10 seconds. Is there
> >> anyway to
> >> cache the AD query and still use the IsInRole?
> >> Thanks :) *
> >
> >
> > --
> > moverton
> > --------------------------------------------------------------------
> > ---- Posted via [url]http://www.codecomments.com[/url]
> > --------------------------------------------------------------------
> > ----
> >
2.0).
--
Joe Gilkey
Principal Programmer / Analyst
NAPCO Security Group / Continental Instruments
Joe Gilkey Guest
-
toddca #5
Re: IsInRole Performance Issue
moverton wrote:Hey guys check out my blog on this subject,> *David, did you ever resolve this problem? We are seeing very
> similar problems.
> -mark *
[url]http://blogs.msdn.com/toddca[/url]
--
toddca
------------------------------------------------------------------------
Posted via [url]http://www.codecomments.com[/url]
------------------------------------------------------------------------
toddca Guest
-
Joe Kaplan \(MVP - ADSI\) #6
Re: IsInRole Performance Issue
Hey Todd!
That's a great post. Thanks for putting that together.
I really like your approach of resolve the role into a SID and check that
directly against the token instead of the other way around. It is very
common for the application to be interested in a pretty small number of
different groups/roles, so it really makes sense to do it this way.
Another behavior that I've noticed is that tends to affect performance is
that the ASP.NET model creates a new WindowsIdentity/WindowsPrincipal object
for each request instead of reusing an existing one. The internal hashtable
that holds the resolved group names needs to get reinitialized for each
request, which can also be slow. Simply caching the WindowsPrincipal and
reusing will make subsequent calls IsInRole MUCH faster.
This doesn't address the issue of the slow initial resolution like your code
does. I was just pointing out another subtle issue with the current model.
Thanks again!
Joe K.
"toddca" <toddca.1o8shs@mail.codecomments.com> wrote in message
news:toddca.1o8shs@mail.codecomments.com...>
> moverton wrote:>>> *David, did you ever resolve this problem? We are seeing very
>> similar problems.
>> -mark *
> Hey guys check out my blog on this subject,
> [url]http://blogs.msdn.com/toddca[/url]
>
>
>
> --
> toddca
> ------------------------------------------------------------------------
> Posted via [url]http://www.codecomments.com[/url]
> ------------------------------------------------------------------------
>
Joe Kaplan \(MVP - ADSI\) Guest



Reply With Quote

