Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Profiling/Debugging Real Time Security Checks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Leistner - 27 Mar 2008 15:18 GMT
I have a medium sized application (say 50k lines) that occasionally will
spike the % of time in RT security checks performance counter between 50 and
95%.

It can perform hundreds of thousands of code access security permission
checks in a few seconds in some cases.

I know that I can set a permission set on a higher level method and demand
then assert to help allieviate some of these checks, but how do I go about
determining what method to assert the permissions and which permissions to
assert?

I guess what I'd really like is to get a list of methods with the number of
calls and the number of code access security permission checks performed
(inclusive and exclusive).

Any ideas of how I can go about profiling/debugging this issue?
Mark Leistner - 27 Mar 2008 20:00 GMT
Well,

I think I figured out the majority of the problem.  It's all LINQ's fault!! :)

It appears that at each run of a query LINQ is rebuilding the query and
causing quite a few security checks.  I converted a single query from a
'normal' linq query to a compiled query and dropped the number of real time
security checks from 1.7m to 800k.

In normal cases I wouldn't hit anywhere near this due to caching, but there
are times...

Anyways thanks to anyone who took the time to look and maybe this will help
someone else out.

> I have a medium sized application (say 50k lines) that occasionally will
> spike the % of time in RT security checks performance counter between 50 and
[quoted text clipped - 13 lines]
>
> Any ideas of how I can go about profiling/debugging this issue?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.